Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: android_webview/browser/aw_content_browser_client.cc

Issue 2183703005: Renderers should obtain browser InterfaceProvider by connecting to browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/browser/aw_content_browser_client.cc
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index 13411a494d2ac2b78560df18d756a1bc536ec998..bac90d2917135539e452eecacbc536a43d1d5fc2 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -167,12 +167,6 @@ AwBrowserContext* AwContentBrowserClient::GetAwBrowserContext() {
AwContentBrowserClient::AwContentBrowserClient(
JniDependencyFactory* native_factory)
: native_factory_(native_factory) {
- base::FilePath user_data_dir;
- if (!PathService::Get(base::DIR_ANDROID_APP_DATA, &user_data_dir)) {
- NOTREACHED() << "Failed to get app data directory for Android WebView";
- }
- browser_context_.reset(
- new AwBrowserContext(user_data_dir, native_factory_));
g_locale_manager = native_factory->CreateAwLocaleManager();
}
@@ -181,6 +175,16 @@ AwContentBrowserClient::~AwContentBrowserClient() {
g_locale_manager = NULL;
}
+AwBrowserContext* AwContentBrowserClient::InitBrowserContext() {
+ base::FilePath user_data_dir;
+ if (!PathService::Get(base::DIR_ANDROID_APP_DATA, &user_data_dir)) {
+ NOTREACHED() << "Failed to get app data directory for Android WebView";
+ }
+ browser_context_.reset(
+ new AwBrowserContext(user_data_dir, native_factory_));
+ return browser_context_.get();
+}
+
void AwContentBrowserClient::AddCertificate(net::CertificateMimeType cert_type,
const void* cert_data,
size_t cert_size,
@@ -192,7 +196,7 @@ void AwContentBrowserClient::AddCertificate(net::CertificateMimeType cert_type,
content::BrowserMainParts* AwContentBrowserClient::CreateBrowserMainParts(
const content::MainFunctionParams& parameters) {
- return new AwBrowserMainParts(browser_context_.get());
+ return new AwBrowserMainParts(this);
}
content::WebContentsViewDelegate*
« no previous file with comments | « android_webview/browser/aw_content_browser_client.h ('k') | blimp/engine/app/blimp_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698