diff --git a/brightray/browser/browser_client.cc b/brightray/browser/browser_client.cc index 2d02e826dda..4de5d7c1ce0 100644 --- a/brightray/browser/browser_client.cc +++ b/brightray/browser/browser_client.cc @@ -10,7 +10,19 @@ namespace brightray { +namespace { + +BrowserClient* g_browser_client; + +} + +BrowserClient* BrowserClient::Get() { + return g_browser_client; +} + BrowserClient::BrowserClient() { + DCHECK(!g_browser_client); + g_browser_client = this; } BrowserClient::~BrowserClient() { diff --git a/brightray/browser/browser_client.h b/brightray/browser/browser_client.h index 33fea3dea32..9a4f3a3bb52 100644 --- a/brightray/browser/browser_client.h +++ b/brightray/browser/browser_client.h @@ -15,6 +15,8 @@ class NotificationPresenter; class BrowserClient : public content::ContentBrowserClient { public: + static BrowserClient* Get(); + BrowserClient(); ~BrowserClient(); diff --git a/brightray/browser/browser_main_parts.cc b/brightray/browser/browser_main_parts.cc index cb58d93be30..04e67f24fb1 100644 --- a/brightray/browser/browser_main_parts.cc +++ b/brightray/browser/browser_main_parts.cc @@ -8,7 +8,7 @@ #include "browser/devtools_delegate.h" #include "content/public/browser/devtools_http_handler.h" -#include "net/base/tcp_listen_socket.h" +#include "net/socket/tcp_listen_socket.h" namespace brightray { diff --git a/brightray/browser/devtools_delegate.cc b/brightray/browser/devtools_delegate.cc index ed9f9a47b8a..ccbcd362aa9 100644 --- a/brightray/browser/devtools_delegate.cc +++ b/brightray/browser/devtools_delegate.cc @@ -40,4 +40,10 @@ std::string DevToolsDelegate::GetViewDescription(content::RenderViewHost*) { return std::string(); } +scoped_refptr DevToolsDelegate::CreateSocketForTethering( + net::StreamListenSocket::Delegate*, + std::string* name) { + return nullptr; +} + } diff --git a/brightray/browser/devtools_delegate.h b/brightray/browser/devtools_delegate.h index 3fb345e2ebe..12dd2087ee7 100644 --- a/brightray/browser/devtools_delegate.h +++ b/brightray/browser/devtools_delegate.h @@ -22,6 +22,9 @@ private: virtual content::RenderViewHost* CreateNewTarget() OVERRIDE; virtual TargetType GetTargetType(content::RenderViewHost*) OVERRIDE; virtual std::string GetViewDescription(content::RenderViewHost*) OVERRIDE; + virtual scoped_refptr CreateSocketForTethering( + net::StreamListenSocket::Delegate*, + std::string* name) OVERRIDE; }; } diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index 144a2b58724..22bddf411c4 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -64,8 +64,7 @@ void InspectableWebContentsImpl::ShowDevTools() { agent_host_ = content::DevToolsAgentHost::GetOrCreateFor(web_contents_->GetRenderViewHost()); frontend_host_.reset(content::DevToolsClientHost::CreateDevToolsFrontendHost(devtools_web_contents_.get(), this)); - auto client = static_cast(content::GetContentClient()->browser()); - auto handler = client->browser_main_parts()->devtools_http_handler(); + auto handler = BrowserClient::Get()->browser_main_parts()->devtools_http_handler(); auto url = handler->GetFrontendURL(nullptr); devtools_web_contents_->GetController().LoadURL(url, content::Referrer(), content::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); } diff --git a/brightray/browser/url_request_context_getter.cc b/brightray/browser/url_request_context_getter.cc index cfaa9a1a194..58a251c239e 100644 --- a/brightray/browser/url_request_context_getter.cc +++ b/brightray/browser/url_request_context_getter.cc @@ -7,10 +7,10 @@ #include "network_delegate.h" #include "base/string_util.h" #include "base/threading/worker_pool.h" -#include "chrome/browser/net/sqlite_persistent_cookie_store.h" #include "content/public/browser/browser_thread.h" +#include "content/public/browser/cookie_store_factory.h" #include "content/public/common/url_constants.h" -#include "net/base/cert_verifier.h" +#include "net/cert/cert_verifier.h" #include "net/cookies/cookie_monster.h" #include "net/http/http_auth_handler_factory.h" #include "net/http/http_cache.h" @@ -59,14 +59,11 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() url_request_context_->set_network_delegate(network_delegate_.get()); storage_.reset( new net::URLRequestContextStorage(url_request_context_.get())); - storage_->set_cookie_store(new net::CookieMonster( - new SQLitePersistentCookieStore( - base_path_.Append(FILE_PATH_LITERAL("Cookies")), - content::BrowserThread::GetMessageLoopProxyForThread(content::BrowserThread::IO), - content::BrowserThread::GetMessageLoopProxyForThread(content::BrowserThread::DB), - false, - nullptr), - NULL)); + storage_->set_cookie_store(content::CreatePersistentCookieStore( + base_path_.Append(FILE_PATH_LITERAL("Cookies")), + false, + nullptr, + nullptr)); storage_->set_server_bound_cert_service(new net::ServerBoundCertService( new net::DefaultServerBoundCertStore(NULL), base::WorkerPool::GetTaskRunner(true))); diff --git a/brightray/browser/url_request_context_getter.h b/brightray/browser/url_request_context_getter.h index cb3c4edcb22..026778e4dc5 100644 --- a/brightray/browser/url_request_context_getter.h +++ b/brightray/browser/url_request_context_getter.h @@ -10,7 +10,9 @@ #include "content/public/browser/content_browser_client.h" #include "net/url_request/url_request_context_getter.h" +namespace base { class MessageLoop; +} namespace net { class HostResolver; @@ -25,8 +27,8 @@ class URLRequestContextGetter : public net::URLRequestContextGetter { public: URLRequestContextGetter( const base::FilePath& base_path, - MessageLoop* io_loop, - MessageLoop* file_loop, + base::MessageLoop* io_loop, + base::MessageLoop* file_loop, content::ProtocolHandlerMap*); virtual ~URLRequestContextGetter(); @@ -37,8 +39,8 @@ private: virtual scoped_refptr GetNetworkTaskRunner() const OVERRIDE; base::FilePath base_path_; - MessageLoop* io_loop_; - MessageLoop* file_loop_; + base::MessageLoop* io_loop_; + base::MessageLoop* file_loop_; scoped_ptr proxy_config_service_; scoped_ptr network_delegate_; diff --git a/brightray/common/application_info_mac.mm b/brightray/common/application_info_mac.mm index be5568a987c..c6df34e5582 100644 --- a/brightray/common/application_info_mac.mm +++ b/brightray/common/application_info_mac.mm @@ -3,7 +3,7 @@ #import "common/mac/foundation_util.h" #import "common/mac/main_application_bundle.h" -#import "base/sys_string_conversions.h" +#import "base/strings/sys_string_conversions.h" namespace brightray { diff --git a/brightray/vendor/libchromiumcontent b/brightray/vendor/libchromiumcontent index b6a0d851db2..0d607ee56be 160000 --- a/brightray/vendor/libchromiumcontent +++ b/brightray/vendor/libchromiumcontent @@ -1 +1 @@ -Subproject commit b6a0d851db2e4f1bf181e05d3e9c2d8fe6ef7f0c +Subproject commit 0d607ee56be77990ba3a929aa4016c1633bad208