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_contents_client_bridge_base.h" | 9 #include "android_webview/browser/aw_contents_client_bridge_base.h" |
10 #include "android_webview/browser/aw_contents_io_thread_client.h" | 10 #include "android_webview/browser/aw_contents_io_thread_client.h" |
11 #include "android_webview/browser/aw_cookie_access_policy.h" | 11 #include "android_webview/browser/aw_cookie_access_policy.h" |
12 #include "android_webview/browser/aw_locale_manager.h" | 12 #include "android_webview/browser/aw_locale_manager.h" |
13 #include "android_webview/browser/aw_printing_message_filter.h" | 13 #include "android_webview/browser/aw_printing_message_filter.h" |
14 #include "android_webview/browser/aw_quota_permission_context.h" | 14 #include "android_webview/browser/aw_quota_permission_context.h" |
15 #include "android_webview/browser/aw_web_preferences_populater.h" | 15 #include "android_webview/browser/aw_web_preferences_populater.h" |
16 #include "android_webview/browser/jni_dependency_factory.h" | 16 #include "android_webview/browser/jni_dependency_factory.h" |
17 #include "android_webview/browser/net/aw_url_request_context_getter.h" | 17 #include "android_webview/browser/net/aw_url_request_context_getter.h" |
18 #include "android_webview/browser/net_disk_cache_remover.h" | 18 #include "android_webview/browser/net_disk_cache_remover.h" |
19 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" | 19 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" |
20 #include "android_webview/common/aw_descriptors.h" | 20 #include "android_webview/common/aw_descriptors.h" |
21 #include "android_webview/common/render_view_messages.h" | 21 #include "android_webview/common/render_view_messages.h" |
22 #include "android_webview/common/url_constants.h" | 22 #include "android_webview/common/url_constants.h" |
23 #include "base/android/locale_utils.h" | 23 #include "base/android/locale_utils.h" |
24 #include "base/base_paths_android.h" | 24 #include "base/base_paths_android.h" |
25 #include "base/command_line.h" | 25 #include "base/command_line.h" |
26 #include "base/path_service.h" | 26 #include "base/path_service.h" |
27 #include "components/cdm/browser/cdm_message_filter_android.h" | 27 #include "components/cdm/browser/cdm_message_filter_android.h" |
28 #include "components/navigation_interception/intercept_navigation_delegate.h" | |
29 #include "content/public/browser/access_token_store.h" | 28 #include "content/public/browser/access_token_store.h" |
30 #include "content/public/browser/browser_message_filter.h" | 29 #include "content/public/browser/browser_message_filter.h" |
31 #include "content/public/browser/child_process_security_policy.h" | 30 #include "content/public/browser/child_process_security_policy.h" |
32 #include "content/public/browser/client_certificate_delegate.h" | 31 #include "content/public/browser/client_certificate_delegate.h" |
33 #include "content/public/browser/navigation_handle.h" | |
34 #include "content/public/browser/navigation_throttle.h" | |
35 #include "content/public/browser/render_frame_host.h" | 32 #include "content/public/browser/render_frame_host.h" |
36 #include "content/public/browser/render_process_host.h" | 33 #include "content/public/browser/render_process_host.h" |
37 #include "content/public/browser/render_view_host.h" | 34 #include "content/public/browser/render_view_host.h" |
38 #include "content/public/browser/web_contents.h" | 35 #include "content/public/browser/web_contents.h" |
39 #include "content/public/common/content_switches.h" | 36 #include "content/public/common/content_switches.h" |
40 #include "content/public/common/url_constants.h" | 37 #include "content/public/common/url_constants.h" |
41 #include "content/public/common/web_preferences.h" | 38 #include "content/public/common/web_preferences.h" |
42 #include "net/android/network_library.h" | 39 #include "net/android/network_library.h" |
43 #include "net/ssl/ssl_cert_request_info.h" | 40 #include "net/ssl/ssl_cert_request_info.h" |
44 #include "net/ssl/ssl_info.h" | 41 #include "net/ssl/ssl_info.h" |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 content::RenderViewHost* rvh, | 480 content::RenderViewHost* rvh, |
484 content::WebPreferences* web_prefs) { | 481 content::WebPreferences* web_prefs) { |
485 if (!preferences_populater_.get()) { | 482 if (!preferences_populater_.get()) { |
486 preferences_populater_ = make_scoped_ptr(native_factory_-> | 483 preferences_populater_ = make_scoped_ptr(native_factory_-> |
487 CreateWebPreferencesPopulater()); | 484 CreateWebPreferencesPopulater()); |
488 } | 485 } |
489 preferences_populater_->PopulateFor( | 486 preferences_populater_->PopulateFor( |
490 content::WebContents::FromRenderViewHost(rvh), web_prefs); | 487 content::WebContents::FromRenderViewHost(rvh), web_prefs); |
491 } | 488 } |
492 | 489 |
493 ScopedVector<content::NavigationThrottle> | |
494 AwContentBrowserClient::CreateThrottlesForNavigation( | |
495 content::NavigationHandle* navigation_handle) { | |
496 ScopedVector<content::NavigationThrottle> throttles; | |
497 if (navigation_handle->IsInMainFrame() || | |
498 (!navigation_handle->GetURL().SchemeIs(url::kHttpScheme) && | |
499 !navigation_handle->GetURL().SchemeIs(url::kHttpsScheme) && | |
500 !navigation_handle->GetURL().SchemeIs(url::kAboutScheme))) { | |
501 throttles.push_back( | |
502 navigation_interception::InterceptNavigationDelegate::CreateThrottleFor( | |
503 navigation_handle) | |
504 .Pass()); | |
505 } | |
506 return throttles.Pass(); | |
507 } | |
508 | |
509 #if defined(VIDEO_HOLE) | 490 #if defined(VIDEO_HOLE) |
510 content::ExternalVideoSurfaceContainer* | 491 content::ExternalVideoSurfaceContainer* |
511 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( | 492 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( |
512 content::WebContents* web_contents) { | 493 content::WebContents* web_contents) { |
513 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); | 494 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); |
514 } | 495 } |
515 #endif | 496 #endif |
516 | 497 |
517 } // namespace android_webview | 498 } // namespace android_webview |
OLD | NEW |