diff --git a/brightray/brightray.gyp b/brightray/brightray.gyp index 593aeadf64..2724510108 100644 --- a/brightray/brightray.gyp +++ b/brightray/brightray.gyp @@ -1,7 +1,7 @@ { 'variables': { # The libraries brightray will be compiled to. - 'linux_system_libraries': 'gtk+-2.0 dbus-1 x11 xi xcursor xdamage xrandr xcomposite xext xfixes xrender xtst xscrnsaver gconf-2.0 gmodule-2.0 nss' + 'linux_system_libraries': 'gtk+-2.0 dbus-1 x11 x11-xcb xcb xi xcursor xdamage xrandr xcomposite xext xfixes xrender xtst xscrnsaver gconf-2.0 gmodule-2.0 nss' }, 'includes': [ 'filenames.gypi', @@ -14,6 +14,7 @@ '.', '<(libchromiumcontent_src_dir)', '<(libchromiumcontent_src_dir)/skia/config', + '<(libchromiumcontent_src_dir)/third_party/boringssl/src/include', '<(libchromiumcontent_src_dir)/third_party/skia/include/core', '<(libchromiumcontent_src_dir)/third_party/mojo/src', '<(libchromiumcontent_src_dir)/third_party/WebKit', @@ -26,6 +27,7 @@ '<(libchromiumcontent_src_dir)', '<(libchromiumcontent_src_dir)/gpu', '<(libchromiumcontent_src_dir)/skia/config', + '<(libchromiumcontent_src_dir)/third_party/boringssl/src/include', '<(libchromiumcontent_src_dir)/third_party/skia/include/core', '<(libchromiumcontent_src_dir)/third_party/skia/include/config', '<(libchromiumcontent_src_dir)/third_party/icu/source/common', @@ -67,7 +69,7 @@ }, 'cflags': [ '(BrowserClient::Get()->GetNetLog()), GetPath(), in_memory_, - BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), - BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE), + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), + BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), protocol_handlers, std::move(protocol_interceptors)); resource_context_->set_url_request_context_getter(url_request_getter_.get()); diff --git a/brightray/browser/browser_main_parts.cc b/brightray/browser/browser_main_parts.cc index 0aae4bcc5b..c37100a76e 100644 --- a/brightray/browser/browser_main_parts.cc +++ b/brightray/browser/browser_main_parts.cc @@ -13,7 +13,6 @@ #include "base/feature_list.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" -#include "components/devtools_http_handler/devtools_http_handler.h" #include "content/public/browser/browser_thread.h" #include "content/public/common/content_switches.h" #include "media/base/media_resources.h" @@ -37,7 +36,7 @@ #include "base/nix/xdg_util.h" #include "base/threading/thread_task_runner_handle.h" #include "browser/brightray_paths.h" -#include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" +#include "chrome/browser/ui/libgtkui/gtk_ui.h" #include "ui/base/x/x11_util.h" #include "ui/base/x/x11_util_internal.h" #include "ui/views/linux_ui/linux_ui.h" @@ -216,7 +215,7 @@ void BrowserMainParts::PreMainMessageLoopRun() { // --remote-debugging-port auto command_line = base::CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kRemoteDebuggingPort)) - devtools_http_handler_.reset(DevToolsManagerDelegate::CreateHttpHandler()); + DevToolsManagerDelegate::StartHttpHandler(); } void BrowserMainParts::PostMainMessageLoopStart() { @@ -245,8 +244,7 @@ int BrowserMainParts::PreCreateThreads() { display::Screen* screen = views::CreateDesktopScreen(); display::Screen::SetScreenInstance(screen); #if defined(USE_X11) - views::LinuxUI::instance()->UpdateDeviceScaleFactor( - screen->GetPrimaryDisplay().device_scale_factor()); + views::LinuxUI::instance()->UpdateDeviceScaleFactor(); #endif #endif return 0; diff --git a/brightray/browser/browser_main_parts.h b/brightray/browser/browser_main_parts.h index a0d58e7609..209e95d87b 100644 --- a/brightray/browser/browser_main_parts.h +++ b/brightray/browser/browser_main_parts.h @@ -9,10 +9,6 @@ #include "base/memory/ref_counted.h" #include "content/public/browser/browser_main_parts.h" -namespace devtools_http_handler { -class DevToolsHttpHandler; -} - #if defined(TOOLKIT_VIEWS) namespace brightray { class ViewsDelegate; @@ -48,8 +44,6 @@ class BrowserMainParts : public content::BrowserMainParts { void InitializeMainNib(); #endif - std::unique_ptr devtools_http_handler_; - #if defined(TOOLKIT_VIEWS) std::unique_ptr views_delegate_; #endif diff --git a/brightray/browser/devtools_manager_delegate.cc b/brightray/browser/devtools_manager_delegate.cc index eedc561678..7d4ae4d7d4 100644 --- a/brightray/browser/devtools_manager_delegate.cc +++ b/brightray/browser/devtools_manager_delegate.cc @@ -15,11 +15,9 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "common/content_client.h" -#include "components/devtools_discovery/basic_target_descriptor.h" -#include "components/devtools_discovery/devtools_discovery_manager.h" -#include "components/devtools_http_handler/devtools_http_handler.h" #include "content/public/browser/devtools_agent_host.h" #include "content/public/browser/devtools_frontend_host.h" +#include "content/public/browser/devtools_socket_factory.h" #include "content/public/browser/favicon_status.h" #include "content/public/browser/navigation_entry.h" #include "content/public/common/content_switches.h" @@ -36,23 +34,26 @@ namespace brightray { namespace { -class TCPServerSocketFactory - : public devtools_http_handler::DevToolsHttpHandler::ServerSocketFactory { +class TCPServerSocketFactory : public content::DevToolsSocketFactory { public: TCPServerSocketFactory(const std::string& address, int port) : address_(address), port_(port) { } private: - // content::DevToolsHttpHandler::ServerSocketFactory. + // content::ServerSocketFactory. std::unique_ptr CreateForHttpServer() override { std::unique_ptr socket( - new net::TCPServerSocket(nullptr, net::NetLog::Source())); + new net::TCPServerSocket(nullptr, net::NetLogSource())); if (socket->ListenWithAddressAndPort(address_, port_, 10) != net::OK) return std::unique_ptr(); return socket; } + std::unique_ptr CreateForTethering( + std::string* name) override { + return std::unique_ptr(); + } std::string address_; uint16_t port_; @@ -60,7 +61,7 @@ class TCPServerSocketFactory DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory); }; -std::unique_ptr +std::unique_ptr CreateSocketFactory() { auto& command_line = *base::CommandLine::ForCurrentProcess(); // See if the user specified a port on the command line (useful for @@ -77,55 +78,8 @@ CreateSocketFactory() { DLOG(WARNING) << "Invalid http debugger port number " << temp_port; } } - return std::unique_ptr< - devtools_http_handler::DevToolsHttpHandler::ServerSocketFactory>( - new TCPServerSocketFactory("127.0.0.1", port)); -} - - -// DevToolsDelegate -------------------------------------------------------- - -class DevToolsDelegate : - public devtools_http_handler::DevToolsHttpHandlerDelegate { - public: - DevToolsDelegate(); - ~DevToolsDelegate() override; - - // devtools_http_handler::DevToolsHttpHandlerDelegate. - std::string GetDiscoveryPageHTML() override; - std::string GetFrontendResource(const std::string& path) override; - std::string GetPageThumbnailData(const GURL& url) override; - content::DevToolsExternalAgentProxyDelegate* HandleWebSocketConnection( - const std::string& path) override; - - private: - DISALLOW_COPY_AND_ASSIGN(DevToolsDelegate); -}; - -DevToolsDelegate::DevToolsDelegate() { -} - -DevToolsDelegate::~DevToolsDelegate() { -} - -std::string DevToolsDelegate::GetDiscoveryPageHTML() { - return ResourceBundle::GetSharedInstance().GetRawDataResource( - IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE).as_string(); -} - - -std::string DevToolsDelegate::GetFrontendResource( - const std::string& path) { - return content::DevToolsFrontendHost::GetFrontendResource(path).as_string(); -} - -std::string DevToolsDelegate::GetPageThumbnailData(const GURL& url) { - return std::string(); -} - -content::DevToolsExternalAgentProxyDelegate* -DevToolsDelegate::HandleWebSocketConnection(const std::string& path) { - return nullptr; + return std::unique_ptr( + new TCPServerSocketFactory("127.0.0.1", port)); } } // namespace @@ -133,12 +87,10 @@ DevToolsDelegate::HandleWebSocketConnection(const std::string& path) { // DevToolsManagerDelegate --------------------------------------------------- // static -devtools_http_handler::DevToolsHttpHandler* -DevToolsManagerDelegate::CreateHttpHandler() { - return new devtools_http_handler::DevToolsHttpHandler( +void DevToolsManagerDelegate::StartHttpHandler() { + content::DevToolsAgentHost::StartRemoteDebuggingServer( CreateSocketFactory(), std::string(), - new DevToolsDelegate, base::FilePath(), base::FilePath(), std::string(), @@ -147,21 +99,12 @@ DevToolsManagerDelegate::CreateHttpHandler() { DevToolsManagerDelegate::DevToolsManagerDelegate() : handler_(new DevToolsNetworkProtocolHandler) { - // NB(zcbenz): This call does nothing, the only purpose is to make sure the - // devtools_discovery module is linked into the final executable on Linux. - // Though it is possible to achieve this by modifying the gyp settings, it - // would greatly increase gyp file's complexity, so I chose to instead do - // this hack. - devtools_discovery::DevToolsDiscoveryManager::GetInstance(); } DevToolsManagerDelegate::~DevToolsManagerDelegate() { } -void DevToolsManagerDelegate::DevToolsAgentStateChanged( - content::DevToolsAgentHost* agent_host, - bool attached) { - handler_->DevToolsAgentStateChanged(agent_host, attached); +void DevToolsManagerDelegate::Inspect(content::DevToolsAgentHost* agent_host) { } base::DictionaryValue* DevToolsManagerDelegate::HandleCommand( @@ -170,4 +113,19 @@ base::DictionaryValue* DevToolsManagerDelegate::HandleCommand( return handler_->HandleCommand(agent_host, command); } +scoped_refptr +DevToolsManagerDelegate::CreateNewTarget(const GURL& url) { + return nullptr; +} + +std::string DevToolsManagerDelegate::GetDiscoveryPageHTML() { + return ResourceBundle::GetSharedInstance().GetRawDataResource( + IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE).as_string(); +} + +std::string DevToolsManagerDelegate::GetFrontendResource( + const std::string& path) { + return content::DevToolsFrontendHost::GetFrontendResource(path).as_string(); +} + } // namespace brightray diff --git a/brightray/browser/devtools_manager_delegate.h b/brightray/browser/devtools_manager_delegate.h index 23d28c74db..2e2e09f43f 100644 --- a/brightray/browser/devtools_manager_delegate.h +++ b/brightray/browser/devtools_manager_delegate.h @@ -7,31 +7,29 @@ #include "base/macros.h" #include "base/compiler_specific.h" -#include "components/devtools_http_handler/devtools_http_handler_delegate.h" +#include "content/browser/devtools/devtools_http_handler.h" #include "content/public/browser/devtools_manager_delegate.h" -namespace devtools_http_handler { -class DevToolsHttpHandler; -} - namespace brightray { class DevToolsNetworkProtocolHandler; class DevToolsManagerDelegate : public content::DevToolsManagerDelegate { public: - static devtools_http_handler::DevToolsHttpHandler* CreateHttpHandler(); + static void StartHttpHandler(); DevToolsManagerDelegate(); virtual ~DevToolsManagerDelegate(); // DevToolsManagerDelegate implementation. - void Inspect(content::BrowserContext* browser_context, - content::DevToolsAgentHost* agent_host) override {} - void DevToolsAgentStateChanged(content::DevToolsAgentHost* agent_host, - bool attached) override; - base::DictionaryValue* HandleCommand(content::DevToolsAgentHost* agent_host, - base::DictionaryValue* command) override; + void Inspect(content::DevToolsAgentHost* agent_host) override; + base::DictionaryValue* HandleCommand( + content::DevToolsAgentHost* agent_host, + base::DictionaryValue* command) override; + scoped_refptr CreateNewTarget( + const GURL& url) override; + std::string GetDiscoveryPageHTML() override; + std::string GetFrontendResource(const std::string& path) override; private: std::unique_ptr handler_; diff --git a/brightray/browser/devtools_ui.cc b/brightray/browser/devtools_ui.cc index 24d7d4737c..9764886d57 100644 --- a/brightray/browser/devtools_ui.cc +++ b/brightray/browser/devtools_ui.cc @@ -14,7 +14,6 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" - namespace brightray { namespace { @@ -62,19 +61,21 @@ class BundledDataSource : public content::URLDataSource { return kChromeUIDevToolsHost; } - void StartDataRequest(const std::string& path, - int render_process_id, - int render_frame_id, - const GotDataCallback& callback) override { + void StartDataRequest( + const std::string& path, + const content::ResourceRequestInfo::WebContentsGetter& wc_getter, + const GotDataCallback& callback) override { // Serve request from local bundle. std::string bundled_path_prefix(kChromeUIDevToolsBundledPath); bundled_path_prefix += "/"; if (base::StartsWith(path, bundled_path_prefix, base::CompareCase::INSENSITIVE_ASCII)) { StartBundledDataRequest(path.substr(bundled_path_prefix.length()), - render_process_id, render_frame_id, callback); + callback); return; } + + // We do not handle remote and custom requests. callback.Run(nullptr); } @@ -94,11 +95,8 @@ class BundledDataSource : public content::URLDataSource { return true; } - void StartBundledDataRequest( - const std::string& path, - int render_process_id, - int render_frame_id, - const content::URLDataSource::GotDataCallback& callback) { + void StartBundledDataRequest(const std::string& path, + const GotDataCallback& callback) { std::string filename = PathWithoutParams(path); base::StringPiece resource = content::DevToolsFrontendHost::GetFrontendResource(filename); diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index 1ab496c6ec..4f4100eb67 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -144,7 +144,7 @@ class ResponseWriter : public net::URLFetcherResponseWriter { int Write(net::IOBuffer* buffer, int num_bytes, const net::CompletionCallback& callback) override; - int Finish(const net::CompletionCallback& callback) override; + int Finish(int net_error, const net::CompletionCallback& callback) override; private: base::WeakPtr bindings_; @@ -181,7 +181,8 @@ int ResponseWriter::Write(net::IOBuffer* buffer, return num_bytes; } -int ResponseWriter::Finish(const net::CompletionCallback& callback) { +int ResponseWriter::Finish(int net_error, + const net::CompletionCallback& callback) { return net::OK; } @@ -394,7 +395,7 @@ void InspectableWebContentsImpl::LoadCompleted() { base::RemoveChars(current_dock_state, "\"", &dock_state_); } base::string16 javascript = base::UTF8ToUTF16( - "WebInspector.dockController.setDockSide(\"" + dock_state_ + "\");"); + "Components.dockController.setDockSide(\"" + dock_state_ + "\");"); devtools_web_contents_->GetMainFrame()->ExecuteJavaScript(javascript); } @@ -654,7 +655,7 @@ void InspectableWebContentsImpl::WebContentsDestroyed() { view_->GetDelegate()->DevToolsClosed(); } -bool InspectableWebContentsImpl::AddMessageToConsole( +bool InspectableWebContentsImpl::DidAddMessageToConsole( content::WebContents* source, int32_t level, const base::string16& message, @@ -726,7 +727,7 @@ void InspectableWebContentsImpl::OnWebContentsFocused() { void InspectableWebContentsImpl::DidStartNavigationToPendingEntry( const GURL& url, - content::NavigationController::ReloadType reload_type) { + content::ReloadType reload_type) { frontend_host_.reset( content::DevToolsFrontendHost::Create( web_contents()->GetMainFrame(), diff --git a/brightray/browser/inspectable_web_contents_impl.h b/brightray/browser/inspectable_web_contents_impl.h index cab3e2132e..9b565f0f2d 100644 --- a/brightray/browser/inspectable_web_contents_impl.h +++ b/brightray/browser/inspectable_web_contents_impl.h @@ -133,14 +133,14 @@ class InspectableWebContentsImpl : void OnWebContentsFocused() override; void DidStartNavigationToPendingEntry( const GURL& url, - content::NavigationController::ReloadType reload_type) override; + content::ReloadType reload_type) override; // content::WebContentsDelegate: - bool AddMessageToConsole(content::WebContents* source, - int32_t level, - const base::string16& message, - int32_t line_no, - const base::string16& source_id) override; + bool DidAddMessageToConsole(content::WebContents* source, + int32_t level, + const base::string16& message, + int32_t line_no, + const base::string16& source_id) override; bool ShouldCreateWebContents( content::WebContents* web_contents, int32_t route_id, diff --git a/brightray/browser/linux/libnotify_notification.cc b/brightray/browser/linux/libnotify_notification.cc index 0fd71faaf1..ab296e2183 100644 --- a/brightray/browser/linux/libnotify_notification.cc +++ b/brightray/browser/linux/libnotify_notification.cc @@ -8,7 +8,7 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "browser/notification_delegate.h" -#include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" +#include "chrome/browser/ui/libgtkui/skia_utils_gtk.h" #include "common/application_info.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -111,7 +111,7 @@ void LibnotifyNotification::Show(const base::string16& title, } if (!icon.drawsNothing()) { - GdkPixbuf* pixbuf = libgtk2ui::GdkPixbufFromSkBitmap(icon); + GdkPixbuf* pixbuf = libgtkui::GdkPixbufFromSkBitmap(icon); libnotify_loader_.notify_notification_set_image_from_pixbuf( notification_, pixbuf); libnotify_loader_.notify_notification_set_timeout( diff --git a/brightray/browser/media/media_stream_devices_controller.cc b/brightray/browser/media/media_stream_devices_controller.cc index b3548bbe40..a744a08ae4 100644 --- a/brightray/browser/media/media_stream_devices_controller.cc +++ b/brightray/browser/media/media_stream_devices_controller.cc @@ -137,10 +137,6 @@ void MediaStreamDevicesController::Accept() { webcam_requested_, &devices); break; - case content::MEDIA_ENUMERATE_DEVICES: - // Do nothing. - NOTREACHED(); - break; } } diff --git a/brightray/browser/net/devtools_network_transaction.cc b/brightray/browser/net/devtools_network_transaction.cc index 0a62346392..ced70acc5e 100644 --- a/brightray/browser/net/devtools_network_transaction.cc +++ b/brightray/browser/net/devtools_network_transaction.cc @@ -103,10 +103,9 @@ bool DevToolsNetworkTransaction::CheckFailed() { return false; } -int DevToolsNetworkTransaction::Start( - const net::HttpRequestInfo* request, - const net::CompletionCallback& callback, - const net::BoundNetLog& net_log) { +int DevToolsNetworkTransaction::Start(const net::HttpRequestInfo* request, + const net::CompletionCallback& callback, + const net::NetLogWithSource& net_log) { DCHECK(request); request_ = request; @@ -129,7 +128,8 @@ int DevToolsNetworkTransaction::Start( request_ = custom_request_.get(); } - DevToolsNetworkInterceptor* interceptor = controller_->GetInterceptor(client_id); + DevToolsNetworkInterceptor* interceptor = + controller_->GetInterceptor(client_id); if (interceptor) { interceptor_ = interceptor->GetWeakPtr(); if (custom_upload_data_stream_) @@ -246,10 +246,6 @@ net::LoadState DevToolsNetworkTransaction::GetLoadState() const { return transaction_->GetLoadState(); } -net::UploadProgress DevToolsNetworkTransaction::GetUploadProgress() const { - return transaction_->GetUploadProgress(); -} - void DevToolsNetworkTransaction::SetQuicServerInfo( net::QuicServerInfo* info) { transaction_->SetQuicServerInfo(info); diff --git a/brightray/browser/net/devtools_network_transaction.h b/brightray/browser/net/devtools_network_transaction.h index 3648ca71c7..7f01d73cad 100644 --- a/brightray/browser/net/devtools_network_transaction.h +++ b/brightray/browser/net/devtools_network_transaction.h @@ -32,7 +32,7 @@ class DevToolsNetworkTransaction : public net::HttpTransaction { // HttpTransaction methods: int Start(const net::HttpRequestInfo* request, const net::CompletionCallback& callback, - const net::BoundNetLog& net_log) override; + const net::NetLogWithSource& net_log) override; int RestartIgnoringLastError( const net::CompletionCallback& callback) override; int RestartWithCertificate(net::X509Certificate* client_cert, @@ -52,7 +52,6 @@ class DevToolsNetworkTransaction : public net::HttpTransaction { void DoneReading() override; const net::HttpResponseInfo* GetResponseInfo() const override; net::LoadState GetLoadState() const override; - net::UploadProgress GetUploadProgress() const override; void SetQuicServerInfo(net::QuicServerInfo* quic_server_info) override; bool GetLoadTimingInfo(net::LoadTimingInfo* load_timing_info) const override; bool GetRemoteEndpoint(net::IPEndPoint* endpoint) const override; diff --git a/brightray/browser/net/devtools_network_upload_data_stream.cc b/brightray/browser/net/devtools_network_upload_data_stream.cc index 975afa4d3c..c6369dcb45 100644 --- a/brightray/browser/net/devtools_network_upload_data_stream.cc +++ b/brightray/browser/net/devtools_network_upload_data_stream.cc @@ -35,11 +35,13 @@ bool DevToolsNetworkUploadDataStream::IsInMemory() const { return false; } -int DevToolsNetworkUploadDataStream::InitInternal(const net::BoundNetLog& net_log) { +int DevToolsNetworkUploadDataStream::InitInternal( + const net::NetLogWithSource& net_log) { throttled_byte_count_ = 0; int result = upload_data_stream_->Init( base::Bind(&DevToolsNetworkUploadDataStream::StreamInitCallback, - base::Unretained(this)), net_log); + base::Unretained(this)), + net_log); if (result == net::OK && !is_chunked()) SetSize(upload_data_stream_->size()); return result; diff --git a/brightray/browser/net/devtools_network_upload_data_stream.h b/brightray/browser/net/devtools_network_upload_data_stream.h index 8db7dd80c8..c3753e8286 100644 --- a/brightray/browser/net/devtools_network_upload_data_stream.h +++ b/brightray/browser/net/devtools_network_upload_data_stream.h @@ -27,7 +27,7 @@ class DevToolsNetworkUploadDataStream : public net::UploadDataStream { private: // net::UploadDataStream implementation. bool IsInMemory() const override; - int InitInternal(const net::BoundNetLog& net_log) override; + int InitInternal(const net::NetLogWithSource& net_log) override; int ReadInternal(net::IOBuffer* buf, int buf_len) override; void ResetInternal() override; diff --git a/brightray/browser/platform_notification_service.cc b/brightray/browser/platform_notification_service.cc index 378cd1143f..3fa04e0814 100644 --- a/brightray/browser/platform_notification_service.cc +++ b/brightray/browser/platform_notification_service.cc @@ -62,6 +62,7 @@ blink::mojom::PermissionStatus PlatformNotificationService::CheckPermissionOnIOT void PlatformNotificationService::DisplayNotification( content::BrowserContext* browser_context, + const std::string& notification_id, const GURL& origin, const content::PlatformNotificationData& notification_data, const content::NotificationResources& notification_resources, @@ -85,8 +86,8 @@ void PlatformNotificationService::DisplayNotification( void PlatformNotificationService::DisplayPersistentNotification( content::BrowserContext* browser_context, - int64_t persistent_notification_id, - const GURL& service_worker_origin, + const std::string& notification_id, + const GURL& service_worker_scope, const GURL& origin, const content::PlatformNotificationData& notification_data, const content::NotificationResources& notification_resources) { @@ -94,7 +95,7 @@ void PlatformNotificationService::DisplayPersistentNotification( void PlatformNotificationService::ClosePersistentNotification( content::BrowserContext* browser_context, - int64_t persistent_notification_id) { + const std::string& notification_id) { } bool PlatformNotificationService::GetDisplayedPersistentNotifications( diff --git a/brightray/browser/platform_notification_service.h b/brightray/browser/platform_notification_service.h index 1e17a6fbae..b2b6471d0f 100644 --- a/brightray/browser/platform_notification_service.h +++ b/brightray/browser/platform_notification_service.h @@ -28,7 +28,9 @@ class PlatformNotificationService content::ResourceContext* resource_context, const GURL& origin, int render_process_id) override; - void DisplayNotification(content::BrowserContext* browser_context, + void DisplayNotification( + content::BrowserContext* browser_context, + const std::string& notification_id, const GURL& origin, const content::PlatformNotificationData& notification_data, const content::NotificationResources& notification_resources, @@ -36,14 +38,13 @@ class PlatformNotificationService base::Closure* cancel_callback) override; void DisplayPersistentNotification( content::BrowserContext* browser_context, - int64_t persistent_notification_id, - const GURL& service_worker_origin, + const std::string& notification_id, + const GURL& service_worker_scope, const GURL& origin, const content::PlatformNotificationData& notification_data, const content::NotificationResources& notification_resources) override; - void ClosePersistentNotification( - content::BrowserContext* browser_context, - int64_t persistent_notification_id) override; + void ClosePersistentNotification(content::BrowserContext* browser_context, + const std::string& notification_id) override; bool GetDisplayedPersistentNotifications( content::BrowserContext* browser_context, std::set* displayed_notifications) override; diff --git a/brightray/browser/url_request_context_getter.cc b/brightray/browser/url_request_context_getter.cc index 9fc8a721d7..e3e7dca543 100644 --- a/brightray/browser/url_request_context_getter.cc +++ b/brightray/browser/url_request_context_getter.cc @@ -118,8 +118,8 @@ URLRequestContextGetter::URLRequestContextGetter( NetLog* net_log, const base::FilePath& base_path, bool in_memory, - base::MessageLoop* io_loop, - base::MessageLoop* file_loop, + scoped_refptr io_task_runner, + scoped_refptr file_task_runner, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector protocol_interceptors) : delegate_(delegate), @@ -127,8 +127,8 @@ URLRequestContextGetter::URLRequestContextGetter( net_log_(net_log), base_path_(base_path), in_memory_(in_memory), - io_loop_(io_loop), - file_loop_(file_loop), + io_task_runner_(io_task_runner), + file_task_runner_(file_task_runner), protocol_interceptors_(std::move(protocol_interceptors)), job_factory_(nullptr) { // Must first be created on the UI thread. @@ -144,7 +144,7 @@ URLRequestContextGetter::URLRequestContextGetter( // must synchronously run on the glib message loop. This will be passed to // the URLRequestContextStorage on the IO thread in GetURLRequestContext(). proxy_config_service_ = net::ProxyService::CreateSystemProxyConfigService( - io_loop_->task_runner(), file_loop_->task_runner()); + io_task_runner_, file_task_runner_); } URLRequestContextGetter::~URLRequestContextGetter() { diff --git a/brightray/browser/url_request_context_getter.h b/brightray/browser/url_request_context_getter.h index c4ff58e242..e08189d862 100644 --- a/brightray/browser/url_request_context_getter.h +++ b/brightray/browser/url_request_context_getter.h @@ -67,8 +67,8 @@ class URLRequestContextGetter : public net::URLRequestContextGetter { NetLog* net_log, const base::FilePath& base_path, bool in_memory, - base::MessageLoop* io_loop, - base::MessageLoop* file_loop, + scoped_refptr io_task_runner, + scoped_refptr file_task_runner, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector protocol_interceptors); virtual ~URLRequestContextGetter(); @@ -90,8 +90,8 @@ class URLRequestContextGetter : public net::URLRequestContextGetter { NetLog* net_log_; base::FilePath base_path_; bool in_memory_; - base::MessageLoop* io_loop_; - base::MessageLoop* file_loop_; + scoped_refptr io_task_runner_; + scoped_refptr file_task_runner_; std::string user_agent_; diff --git a/brightray/browser/views/views_delegate.cc b/brightray/browser/views/views_delegate.cc index a18d52a6ae..8dcbe38ae2 100644 --- a/brightray/browser/views/views_delegate.cc +++ b/brightray/browser/views/views_delegate.cc @@ -100,10 +100,6 @@ void ViewsDelegate::OnBeforeWidgetInit( } -base::TimeDelta ViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() { - return base::TimeDelta(); -} - bool ViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) { #if defined(OS_LINUX) // On Ubuntu Unity, the system always provides a title bar for maximized diff --git a/brightray/browser/views/views_delegate.h b/brightray/browser/views/views_delegate.h index 157660aa5d..d63eeb533d 100644 --- a/brightray/browser/views/views_delegate.h +++ b/brightray/browser/views/views_delegate.h @@ -51,7 +51,6 @@ class ViewsDelegate : public views::ViewsDelegate { void OnBeforeWidgetInit( views::Widget::InitParams* params, views::internal::NativeWidgetDelegate* delegate) override; - base::TimeDelta GetDefaultTextfieldObscuredRevealDuration() override; bool WindowManagerProvidesTitleBar(bool maximized) override; private: diff --git a/brightray/browser/win/notification_presenter_win.cc b/brightray/browser/win/notification_presenter_win.cc index 107b62ea76..018fa3212a 100644 --- a/brightray/browser/win/notification_presenter_win.cc +++ b/brightray/browser/win/notification_presenter_win.cc @@ -56,7 +56,7 @@ bool NotificationPresenterWin::Init() { base::string16 NotificationPresenterWin::SaveIconToFilesystem( const SkBitmap& icon, const GURL& origin) { std::string filename = base::MD5String(origin.spec()) + ".png"; - base::FilePath path = temp_dir_.path().Append(base::UTF8ToUTF16(filename)); + base::FilePath path = temp_dir_.GetPath().Append(base::UTF8ToUTF16(filename)); if (base::PathExists(path)) return path.value(); if (SaveIconToPath(icon, path)) diff --git a/brightray/vendor/libchromiumcontent b/brightray/vendor/libchromiumcontent index 25ec31e58d..e0da1e9caa 160000 --- a/brightray/vendor/libchromiumcontent +++ b/brightray/vendor/libchromiumcontent @@ -1 +1 @@ -Subproject commit 25ec31e58d23002a02dc85dd4b8200b72d50a6c7 +Subproject commit e0da1e9caa7c8f3da3519963a9ea32abba43c7c8