diff --git a/brightray/browser/devtools_manager_delegate.cc b/brightray/browser/devtools_manager_delegate.cc index 014a3d825c49..ec660d08ce03 100644 --- a/brightray/browser/devtools_manager_delegate.cc +++ b/brightray/browser/devtools_manager_delegate.cc @@ -50,17 +50,24 @@ const char kTargetTypeOther[] = "other"; class TCPServerSocketFactory : public content::DevToolsHttpHandler::ServerSocketFactory { public: - TCPServerSocketFactory(const std::string& address, int port, int backlog) - : content::DevToolsHttpHandler::ServerSocketFactory( - address, port, backlog) {} + TCPServerSocketFactory(const std::string& address, int port) + : address_(address), port_(port) { + } private: // content::DevToolsHttpHandler::ServerSocketFactory. - scoped_ptr Create() const override { - return scoped_ptr( - new net::TCPServerSocket(NULL, net::NetLog::Source())); + scoped_ptr CreateForHttpServer() override { + scoped_ptr socket( + new net::TCPServerSocket(nullptr, net::NetLog::Source())); + if (socket->ListenWithAddressAndPort(address_, port_, 10) != net::OK) + return scoped_ptr(); + + return socket; } + std::string address_; + uint16 port_; + DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory); }; @@ -82,7 +89,7 @@ CreateSocketFactory() { } } return scoped_ptr( - new TCPServerSocketFactory("127.0.0.1", port, 1)); + new TCPServerSocketFactory("127.0.0.1", port)); } class Target : public content::DevToolsTarget { @@ -152,8 +159,6 @@ class DevToolsDelegate : public content::DevToolsHttpHandlerDelegate { std::string GetDiscoveryPageHTML() override; bool BundlesFrontendResources() override; base::FilePath GetDebugFrontendDir() override; - scoped_ptr CreateSocketForTethering( - std::string* name) override; private: DISALLOW_COPY_AND_ASSIGN(DevToolsDelegate); @@ -178,11 +183,6 @@ base::FilePath DevToolsDelegate::GetDebugFrontendDir() { return base::FilePath(); } -scoped_ptr DevToolsDelegate::CreateSocketForTethering( - std::string* name) { - return scoped_ptr(); -} - } // namespace // DevToolsManagerDelegate --------------------------------------------------- diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index 9def5ad86301..dcd75cd76f2e 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -324,6 +324,7 @@ void InspectableWebContentsImpl::AgentHostClosed( } void InspectableWebContentsImpl::AboutToNavigateRenderFrame( + content::RenderFrameHost* old_host, content::RenderFrameHost* new_host) { if (new_host->GetParent()) return; diff --git a/brightray/browser/inspectable_web_contents_impl.h b/brightray/browser/inspectable_web_contents_impl.h index a7e248d575d0..6e6346ebb7c6 100644 --- a/brightray/browser/inspectable_web_contents_impl.h +++ b/brightray/browser/inspectable_web_contents_impl.h @@ -104,7 +104,8 @@ class InspectableWebContentsImpl : bool replaced) override; // content::WebContentsObserver: - void AboutToNavigateRenderFrame(content::RenderFrameHost* new_host) override; + void AboutToNavigateRenderFrame(content::RenderFrameHost* old_host, + content::RenderFrameHost* new_host) override; void DidFinishLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url) override; void WebContentsDestroyed() override; diff --git a/brightray/browser/platform_notification_service_impl.cc b/brightray/browser/platform_notification_service_impl.cc index f47d3851198d..3a2153528a91 100644 --- a/brightray/browser/platform_notification_service_impl.cc +++ b/brightray/browser/platform_notification_service_impl.cc @@ -27,7 +27,14 @@ NotificationPresenter* PlatformNotificationServiceImpl::notification_presenter() return notification_presenter_.get(); } -blink::WebNotificationPermission PlatformNotificationServiceImpl::CheckPermission( +blink::WebNotificationPermission PlatformNotificationServiceImpl::CheckPermissionOnUIThread( + content::BrowserContext* browser_context, + const GURL& origin, + int render_process_id) { + return blink::WebNotificationPermissionAllowed; +} + +blink::WebNotificationPermission PlatformNotificationServiceImpl::CheckPermissionOnIOThread( content::ResourceContext* resource_context, const GURL& origin, int render_process_id) { @@ -40,7 +47,6 @@ void PlatformNotificationServiceImpl::DisplayNotification( const SkBitmap& icon, const content::PlatformNotificationData& notification_data, scoped_ptr delegate, - int render_process_id, base::Closure* cancel_callback) { auto presenter = notification_presenter(); if (presenter) @@ -49,11 +55,10 @@ void PlatformNotificationServiceImpl::DisplayNotification( void PlatformNotificationServiceImpl::DisplayPersistentNotification( content::BrowserContext* browser_context, - int64 service_worker_registration_id, + int64_t service_worker_registration_id, const GURL& origin, const SkBitmap& icon, - const content::PlatformNotificationData& notification_data, - int render_process_id) { + const content::PlatformNotificationData& notification_data) { } void PlatformNotificationServiceImpl::ClosePersistentNotification( diff --git a/brightray/browser/platform_notification_service_impl.h b/brightray/browser/platform_notification_service_impl.h index 1a542bcc89b1..4b0d4fa96c7f 100644 --- a/brightray/browser/platform_notification_service_impl.h +++ b/brightray/browser/platform_notification_service_impl.h @@ -28,26 +28,28 @@ class PlatformNotificationServiceImpl ~PlatformNotificationServiceImpl() override; // content::PlatformNotificationService: - virtual blink::WebNotificationPermission CheckPermission( + blink::WebNotificationPermission CheckPermissionOnUIThread( + content::BrowserContext* browser_context, + const GURL& origin, + int render_process_id) override; + blink::WebNotificationPermission CheckPermissionOnIOThread( content::ResourceContext* resource_context, const GURL& origin, int render_process_id) override; - virtual void DisplayNotification( + void DisplayNotification( content::BrowserContext* browser_context, const GURL& origin, const SkBitmap& icon, const content::PlatformNotificationData& notification_data, scoped_ptr delegate, - int render_process_id, base::Closure* cancel_callback) override; - virtual void DisplayPersistentNotification( + void DisplayPersistentNotification( content::BrowserContext* browser_context, - int64 service_worker_registration_id, + int64_t service_worker_registration_id, const GURL& origin, const SkBitmap& icon, - const content::PlatformNotificationData& notification_data, - int render_process_id) override; - virtual void ClosePersistentNotification( + const content::PlatformNotificationData& notification_data) override; + void ClosePersistentNotification( content::BrowserContext* browser_context, const std::string& persistent_notification_id) override; diff --git a/brightray/browser/url_request_context_getter.cc b/brightray/browser/url_request_context_getter.cc index 8a1429398186..6a92047266c8 100644 --- a/brightray/browser/url_request_context_getter.cc +++ b/brightray/browser/url_request_context_getter.cc @@ -154,9 +154,9 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES, NULL, NULL); storage_->set_cookie_store(content::CreateCookieStore(cookie_config)); - storage_->set_channel_id_service(new net::ChannelIDService( - new net::DefaultChannelIDStore(NULL), - base::WorkerPool::GetTaskRunner(true))); + storage_->set_channel_id_service(make_scoped_ptr( + new net::ChannelIDService(new net::DefaultChannelIDStore(NULL), + base::WorkerPool::GetTaskRunner(true)))); storage_->set_http_user_agent_settings(new net::StaticHttpUserAgentSettings( "en-us,en", base::EmptyString()));