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

Side by Side Diff: android_webview/browser/aw_content_browser_client.cc

Issue 23619089: [Android WebView] Populate WebKit WebPreferences correctly in browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/browser/aw_content_browser_client.h" 5 #include "android_webview/browser/aw_content_browser_client.h"
6 6
7 #include "android_webview/browser/aw_browser_context.h" 7 #include "android_webview/browser/aw_browser_context.h"
8 #include "android_webview/browser/aw_browser_main_parts.h" 8 #include "android_webview/browser/aw_browser_main_parts.h"
9 #include "android_webview/browser/aw_contents_client_bridge_base.h" 9 #include "android_webview/browser/aw_contents_client_bridge_base.h"
10 #include "android_webview/browser/aw_cookie_access_policy.h" 10 #include "android_webview/browser/aw_cookie_access_policy.h"
11 #include "android_webview/browser/aw_quota_permission_context.h" 11 #include "android_webview/browser/aw_quota_permission_context.h"
12 #include "android_webview/browser/aw_web_preferences_populater.h"
12 #include "android_webview/browser/jni_dependency_factory.h" 13 #include "android_webview/browser/jni_dependency_factory.h"
13 #include "android_webview/browser/net_disk_cache_remover.h" 14 #include "android_webview/browser/net_disk_cache_remover.h"
14 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele gate.h" 15 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele gate.h"
15 #include "android_webview/common/url_constants.h" 16 #include "android_webview/common/url_constants.h"
16 #include "base/base_paths_android.h" 17 #include "base/base_paths_android.h"
17 #include "base/path_service.h" 18 #include "base/path_service.h"
18 #include "content/public/browser/access_token_store.h" 19 #include "content/public/browser/access_token_store.h"
19 #include "content/public/browser/child_process_security_policy.h" 20 #include "content/public/browser/child_process_security_policy.h"
20 #include "content/public/browser/render_process_host.h" 21 #include "content/public/browser/render_process_host.h"
21 #include "content/public/browser/render_view_host.h" 22 #include "content/public/browser/render_view_host.h"
23 #include "content/public/browser/web_contents.h"
22 #include "content/public/common/url_constants.h" 24 #include "content/public/common/url_constants.h"
23 #include "grit/ui_resources.h" 25 #include "grit/ui_resources.h"
24 #include "net/android/network_library.h" 26 #include "net/android/network_library.h"
25 #include "net/ssl/ssl_info.h" 27 #include "net/ssl/ssl_info.h"
26 #include "ui/base/l10n/l10n_util_android.h" 28 #include "ui/base/l10n/l10n_util_android.h"
27 #include "ui/base/resource/resource_bundle.h" 29 #include "ui/base/resource/resource_bundle.h"
30 #include "webkit/common/webpreferences.h"
28 31
29 namespace android_webview { 32 namespace android_webview {
30 namespace { 33 namespace {
31 34
32 class AwAccessTokenStore : public content::AccessTokenStore { 35 class AwAccessTokenStore : public content::AccessTokenStore {
33 public: 36 public:
34 AwAccessTokenStore() { } 37 AwAccessTokenStore() { }
35 38
36 // content::AccessTokenStore implementation 39 // content::AccessTokenStore implementation
37 virtual void LoadAccessTokens( 40 virtual void LoadAccessTokens(
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 383
381 bool AwContentBrowserClient::AllowPepperSocketAPI( 384 bool AwContentBrowserClient::AllowPepperSocketAPI(
382 content::BrowserContext* browser_context, 385 content::BrowserContext* browser_context,
383 const GURL& url, 386 const GURL& url,
384 bool private_api, 387 bool private_api,
385 const content::SocketPermissionRequest* params) { 388 const content::SocketPermissionRequest* params) {
386 NOTREACHED() << "Android WebView does not support plugins"; 389 NOTREACHED() << "Android WebView does not support plugins";
387 return false; 390 return false;
388 } 391 }
389 392
393 void AwContentBrowserClient::OverrideWebkitPrefs(content::RenderViewHost* rvh,
394 const GURL& url,
395 WebPreferences* web_prefs) {
396 if (!preferences_populater_.get()) {
397 preferences_populater_ = make_scoped_ptr(native_factory_->
398 CreateWebPreferencesPopulater());
399 }
400 preferences_populater_->PopulateFor(
401 content::WebContents::FromRenderViewHost(rvh), web_prefs);
402 }
403
390 } // namespace android_webview 404 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/aw_content_browser_client.h ('k') | android_webview/browser/aw_web_preferences_populater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698