OLD | NEW |
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_browser_permission_request_delegate.h" | 9 #include "android_webview/browser/aw_browser_permission_request_delegate.h" |
10 #include "android_webview/browser/aw_contents_client_bridge_base.h" | 10 #include "android_webview/browser/aw_contents_client_bridge_base.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "base/path_service.h" | 21 #include "base/path_service.h" |
22 #include "components/cdm/browser/cdm_message_filter_android.h" | 22 #include "components/cdm/browser/cdm_message_filter_android.h" |
23 #include "content/public/browser/access_token_store.h" | 23 #include "content/public/browser/access_token_store.h" |
24 #include "content/public/browser/browser_message_filter.h" | 24 #include "content/public/browser/browser_message_filter.h" |
25 #include "content/public/browser/browser_thread.h" | 25 #include "content/public/browser/browser_thread.h" |
26 #include "content/public/browser/child_process_security_policy.h" | 26 #include "content/public/browser/child_process_security_policy.h" |
27 #include "content/public/browser/render_process_host.h" | 27 #include "content/public/browser/render_process_host.h" |
28 #include "content/public/browser/render_view_host.h" | 28 #include "content/public/browser/render_view_host.h" |
29 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
30 #include "content/public/common/url_constants.h" | 30 #include "content/public/common/url_constants.h" |
| 31 #include "content/public/common/web_preferences.h" |
31 #include "grit/ui_resources.h" | 32 #include "grit/ui_resources.h" |
32 #include "net/android/network_library.h" | 33 #include "net/android/network_library.h" |
33 #include "net/ssl/ssl_cert_request_info.h" | 34 #include "net/ssl/ssl_cert_request_info.h" |
34 #include "net/ssl/ssl_info.h" | 35 #include "net/ssl/ssl_info.h" |
35 #include "ui/base/l10n/l10n_util_android.h" | 36 #include "ui/base/l10n/l10n_util_android.h" |
36 #include "ui/base/resource/resource_bundle.h" | 37 #include "ui/base/resource/resource_bundle.h" |
37 #include "webkit/common/webpreferences.h" | |
38 | 38 |
39 using content::BrowserThread; | 39 using content::BrowserThread; |
40 | 40 |
41 namespace android_webview { | 41 namespace android_webview { |
42 namespace { | 42 namespace { |
43 | 43 |
44 // TODO(sgurun) move this to its own file. | 44 // TODO(sgurun) move this to its own file. |
45 // This class filters out incoming aw_contents related IPC messages for the | 45 // This class filters out incoming aw_contents related IPC messages for the |
46 // renderer process on the IPC thread. | 46 // renderer process on the IPC thread. |
47 class AwContentsMessageFilter : public content::BrowserMessageFilter { | 47 class AwContentsMessageFilter : public content::BrowserMessageFilter { |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 | 565 |
566 bool AwContentBrowserClient::AllowPepperSocketAPI( | 566 bool AwContentBrowserClient::AllowPepperSocketAPI( |
567 content::BrowserContext* browser_context, | 567 content::BrowserContext* browser_context, |
568 const GURL& url, | 568 const GURL& url, |
569 bool private_api, | 569 bool private_api, |
570 const content::SocketPermissionRequest* params) { | 570 const content::SocketPermissionRequest* params) { |
571 NOTREACHED() << "Android WebView does not support plugins"; | 571 NOTREACHED() << "Android WebView does not support plugins"; |
572 return false; | 572 return false; |
573 } | 573 } |
574 | 574 |
575 void AwContentBrowserClient::OverrideWebkitPrefs(content::RenderViewHost* rvh, | 575 void AwContentBrowserClient::OverrideWebkitPrefs( |
576 const GURL& url, | 576 content::RenderViewHost* rvh, |
577 WebPreferences* web_prefs) { | 577 const GURL& url, |
| 578 content::WebPreferences* web_prefs) { |
578 if (!preferences_populater_.get()) { | 579 if (!preferences_populater_.get()) { |
579 preferences_populater_ = make_scoped_ptr(native_factory_-> | 580 preferences_populater_ = make_scoped_ptr(native_factory_-> |
580 CreateWebPreferencesPopulater()); | 581 CreateWebPreferencesPopulater()); |
581 } | 582 } |
582 preferences_populater_->PopulateFor( | 583 preferences_populater_->PopulateFor( |
583 content::WebContents::FromRenderViewHost(rvh), web_prefs); | 584 content::WebContents::FromRenderViewHost(rvh), web_prefs); |
584 } | 585 } |
585 | 586 |
586 #if defined(VIDEO_HOLE) | 587 #if defined(VIDEO_HOLE) |
587 content::ExternalVideoSurfaceContainer* | 588 content::ExternalVideoSurfaceContainer* |
588 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( | 589 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( |
589 content::WebContents* web_contents) { | 590 content::WebContents* web_contents) { |
590 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); | 591 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); |
591 } | 592 } |
592 #endif | 593 #endif |
593 | 594 |
594 } // namespace android_webview | 595 } // namespace android_webview |
OLD | NEW |