| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "android_webview/browser/aw_browser_context.h" | 9 #include "android_webview/browser/aw_browser_context.h" |
| 10 #include "android_webview/browser/aw_browser_main_parts.h" | 10 #include "android_webview/browser/aw_browser_main_parts.h" |
| 11 #include "android_webview/browser/aw_contents_client_bridge_base.h" | 11 #include "android_webview/browser/aw_contents_client_bridge_base.h" |
| 12 #include "android_webview/browser/aw_contents_io_thread_client.h" | 12 #include "android_webview/browser/aw_contents_io_thread_client.h" |
| 13 #include "android_webview/browser/aw_cookie_access_policy.h" | 13 #include "android_webview/browser/aw_cookie_access_policy.h" |
| 14 #include "android_webview/browser/aw_devtools_manager_delegate.h" | 14 #include "android_webview/browser/aw_devtools_manager_delegate.h" |
| 15 #include "android_webview/browser/aw_locale_manager.h" | 15 #include "android_webview/browser/aw_locale_manager.h" |
| 16 #include "android_webview/browser/aw_printing_message_filter.h" | 16 #include "android_webview/browser/aw_printing_message_filter.h" |
| 17 #include "android_webview/browser/aw_quota_permission_context.h" | 17 #include "android_webview/browser/aw_quota_permission_context.h" |
| 18 #include "android_webview/browser/aw_web_preferences_populater.h" | 18 #include "android_webview/browser/aw_web_preferences_populater.h" |
| 19 #include "android_webview/browser/jni_dependency_factory.h" | 19 #include "android_webview/browser/jni_dependency_factory.h" |
| 20 #include "android_webview/browser/net/aw_url_request_context_getter.h" | 20 #include "android_webview/browser/net/aw_url_request_context_getter.h" |
| 21 #include "android_webview/browser/net_disk_cache_remover.h" | 21 #include "android_webview/browser/net_disk_cache_remover.h" |
| 22 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" | 22 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" |
| 23 #include "android_webview/browser/tracing/aw_tracing_delegate.h" | 23 #include "android_webview/browser/tracing/aw_tracing_delegate.h" |
| 24 #include "android_webview/common/aw_descriptors.h" | 24 #include "android_webview/common/aw_descriptors.h" |
| 25 #include "android_webview/common/aw_switches.h" | 25 #include "android_webview/common/aw_switches.h" |
| 26 #include "android_webview/common/render_view_messages.h" | 26 #include "android_webview/common/render_view_messages.h" |
| 27 #include "android_webview/common/url_constants.h" | 27 #include "android_webview/common/url_constants.h" |
| 28 #include "android_webview/grit/aw_resources.h" |
| 28 #include "base/android/locale_utils.h" | 29 #include "base/android/locale_utils.h" |
| 29 #include "base/base_paths_android.h" | 30 #include "base/base_paths_android.h" |
| 30 #include "base/command_line.h" | 31 #include "base/command_line.h" |
| 31 #include "base/files/scoped_file.h" | 32 #include "base/files/scoped_file.h" |
| 33 #include "base/json/json_reader.h" |
| 32 #include "base/memory/ptr_util.h" | 34 #include "base/memory/ptr_util.h" |
| 33 #include "base/path_service.h" | 35 #include "base/path_service.h" |
| 34 #include "components/cdm/browser/cdm_message_filter_android.h" | 36 #include "components/cdm/browser/cdm_message_filter_android.h" |
| 35 #include "components/crash/content/browser/crash_micro_dump_manager_android.h" | 37 #include "components/crash/content/browser/crash_micro_dump_manager_android.h" |
| 36 #include "components/navigation_interception/intercept_navigation_delegate.h" | 38 #include "components/navigation_interception/intercept_navigation_delegate.h" |
| 37 #include "content/public/browser/browser_message_filter.h" | 39 #include "content/public/browser/browser_message_filter.h" |
| 38 #include "content/public/browser/browser_thread.h" | 40 #include "content/public/browser/browser_thread.h" |
| 39 #include "content/public/browser/child_process_security_policy.h" | 41 #include "content/public/browser/child_process_security_policy.h" |
| 40 #include "content/public/browser/client_certificate_delegate.h" | 42 #include "content/public/browser/client_certificate_delegate.h" |
| 41 #include "content/public/browser/navigation_handle.h" | 43 #include "content/public/browser/navigation_handle.h" |
| 42 #include "content/public/browser/navigation_throttle.h" | 44 #include "content/public/browser/navigation_throttle.h" |
| 43 #include "content/public/browser/render_frame_host.h" | 45 #include "content/public/browser/render_frame_host.h" |
| 44 #include "content/public/browser/render_process_host.h" | 46 #include "content/public/browser/render_process_host.h" |
| 45 #include "content/public/browser/render_view_host.h" | 47 #include "content/public/browser/render_view_host.h" |
| 46 #include "content/public/browser/web_contents.h" | 48 #include "content/public/browser/web_contents.h" |
| 47 #include "content/public/common/content_switches.h" | 49 #include "content/public/common/content_switches.h" |
| 50 #include "content/public/common/service_names.h" |
| 48 #include "content/public/common/url_constants.h" | 51 #include "content/public/common/url_constants.h" |
| 49 #include "content/public/common/web_preferences.h" | 52 #include "content/public/common/web_preferences.h" |
| 50 #include "device/geolocation/access_token_store.h" | 53 #include "device/geolocation/access_token_store.h" |
| 51 #include "device/geolocation/geolocation_delegate.h" | 54 #include "device/geolocation/geolocation_delegate.h" |
| 52 #include "net/android/network_library.h" | 55 #include "net/android/network_library.h" |
| 53 #include "net/ssl/ssl_cert_request_info.h" | 56 #include "net/ssl/ssl_cert_request_info.h" |
| 54 #include "net/ssl/ssl_info.h" | 57 #include "net/ssl/ssl_info.h" |
| 55 #include "ui/base/resource/resource_bundle.h" | 58 #include "ui/base/resource/resource_bundle.h" |
| 56 #include "ui/base/resource/resource_bundle_android.h" | 59 #include "ui/base/resource/resource_bundle_android.h" |
| 57 #include "ui/resources/grit/ui_resources.h" | 60 #include "ui/resources/grit/ui_resources.h" |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 navigation_handle)); | 518 navigation_handle)); |
| 516 } | 519 } |
| 517 return throttles; | 520 return throttles; |
| 518 } | 521 } |
| 519 | 522 |
| 520 content::DevToolsManagerDelegate* | 523 content::DevToolsManagerDelegate* |
| 521 AwContentBrowserClient::GetDevToolsManagerDelegate() { | 524 AwContentBrowserClient::GetDevToolsManagerDelegate() { |
| 522 return new AwDevToolsManagerDelegate(); | 525 return new AwDevToolsManagerDelegate(); |
| 523 } | 526 } |
| 524 | 527 |
| 528 std::unique_ptr<base::Value> |
| 529 AwContentBrowserClient::GetServiceManifestOverlay(const std::string& name) { |
| 530 int id = -1; |
| 531 if (name == content::kBrowserServiceName) |
| 532 id = IDR_AW_BROWSER_MANIFEST_OVERLAY; |
| 533 if (id == -1) |
| 534 return nullptr; |
| 535 |
| 536 base::StringPiece manifest_contents = |
| 537 ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( |
| 538 id, ui::ScaleFactor::SCALE_FACTOR_NONE); |
| 539 return base::JSONReader::Read(manifest_contents); |
| 540 } |
| 541 |
| 525 } // namespace android_webview | 542 } // namespace android_webview |
| OLD | NEW |