| 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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 #include "content/public/common/web_preferences.h" | 170 #include "content/public/common/web_preferences.h" |
| 171 #include "device/usb/public/interfaces/chooser_service.mojom.h" | 171 #include "device/usb/public/interfaces/chooser_service.mojom.h" |
| 172 #include "device/usb/public/interfaces/device_manager.mojom.h" | 172 #include "device/usb/public/interfaces/device_manager.mojom.h" |
| 173 #include "gin/v8_initializer.h" | 173 #include "gin/v8_initializer.h" |
| 174 #include "net/base/mime_util.h" | 174 #include "net/base/mime_util.h" |
| 175 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 175 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
| 176 #include "net/cookies/canonical_cookie.h" | 176 #include "net/cookies/canonical_cookie.h" |
| 177 #include "net/cookies/cookie_options.h" | 177 #include "net/cookies/cookie_options.h" |
| 178 #include "net/ssl/ssl_cert_request_info.h" | 178 #include "net/ssl/ssl_cert_request_info.h" |
| 179 #include "ppapi/host/ppapi_host.h" | 179 #include "ppapi/host/ppapi_host.h" |
| 180 #include "services/shell/public/cpp/interface_provider.h" | |
| 181 #include "services/shell/public/cpp/service.h" | 180 #include "services/shell/public/cpp/service.h" |
| 182 #include "storage/browser/fileapi/external_mount_points.h" | 181 #include "storage/browser/fileapi/external_mount_points.h" |
| 183 #include "third_party/WebKit/public/platform/modules/payments/payment_request.mo
jom.h" | |
| 184 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" | |
| 185 #include "ui/base/l10n/l10n_util.h" | 182 #include "ui/base/l10n/l10n_util.h" |
| 186 #include "ui/base/resource/resource_bundle.h" | 183 #include "ui/base/resource/resource_bundle.h" |
| 187 #include "ui/resources/grit/ui_resources.h" | 184 #include "ui/resources/grit/ui_resources.h" |
| 188 #include "url/gurl.h" | 185 #include "url/gurl.h" |
| 189 #include "url/origin.h" | 186 #include "url/origin.h" |
| 190 | 187 |
| 191 #if defined(OS_WIN) | 188 #if defined(OS_WIN) |
| 192 #include "base/strings/string_tokenizer.h" | 189 #include "base/strings/string_tokenizer.h" |
| 193 #include "base/win/windows_version.h" | 190 #include "base/win/windows_version.h" |
| 194 #include "chrome/browser/chrome_browser_main_win.h" | 191 #include "chrome/browser/chrome_browser_main_win.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 #include "chrome/browser/chrome_browser_main_posix.h" | 224 #include "chrome/browser/chrome_browser_main_posix.h" |
| 228 #endif | 225 #endif |
| 229 | 226 |
| 230 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 227 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 231 #include "base/debug/leak_annotations.h" | 228 #include "base/debug/leak_annotations.h" |
| 232 #include "components/crash/content/app/breakpad_linux.h" | 229 #include "components/crash/content/app/breakpad_linux.h" |
| 233 #include "components/crash/content/browser/crash_handler_host_linux.h" | 230 #include "components/crash/content/browser/crash_handler_host_linux.h" |
| 234 #endif | 231 #endif |
| 235 | 232 |
| 236 #if BUILDFLAG(ANDROID_JAVA_UI) | 233 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 234 #include "chrome/browser/android/mojo/chrome_interface_registrar_android.h" |
| 237 #include "chrome/browser/android/ntp/new_tab_page_url_handler.h" | 235 #include "chrome/browser/android/ntp/new_tab_page_url_handler.h" |
| 238 #include "chrome/browser/android/service_tab_launcher.h" | 236 #include "chrome/browser/android/service_tab_launcher.h" |
| 239 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" | 237 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" |
| 240 #include "content/public/browser/android/java_interfaces.h" | |
| 241 #endif | 238 #endif |
| 242 | 239 |
| 243 #if defined(OS_ANDROID) | 240 #if defined(OS_ANDROID) |
| 244 #include "chrome/browser/android/devtools_manager_delegate_android.h" | 241 #include "chrome/browser/android/devtools_manager_delegate_android.h" |
| 245 #include "ui/base/ui_base_paths.h" | 242 #include "ui/base/ui_base_paths.h" |
| 246 #include "ui/gfx/android/device_display_info.h" | 243 #include "ui/gfx/android/device_display_info.h" |
| 247 #else | 244 #else |
| 248 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" | 245 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" |
| 249 #endif | 246 #endif |
| 250 | 247 |
| (...skipping 2691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2942 registry->AddInterface( | 2939 registry->AddInterface( |
| 2943 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, | 2940 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, |
| 2944 render_frame_host)); | 2941 render_frame_host)); |
| 2945 | 2942 |
| 2946 registry->AddInterface( | 2943 registry->AddInterface( |
| 2947 base::Bind(&password_manager::ContentPasswordManagerDriverFactory:: | 2944 base::Bind(&password_manager::ContentPasswordManagerDriverFactory:: |
| 2948 BindPasswordManagerDriver, | 2945 BindPasswordManagerDriver, |
| 2949 render_frame_host)); | 2946 render_frame_host)); |
| 2950 | 2947 |
| 2951 #if BUILDFLAG(ANDROID_JAVA_UI) | 2948 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 2952 content::WebContents* web_contents = | 2949 ChromeInterfaceRegistrarAndroid::ExposeInterfacesToFrame( |
| 2953 content::WebContents::FromRenderFrameHost(render_frame_host); | 2950 registry, render_frame_host); |
| 2954 if (web_contents) { | |
| 2955 registry->AddInterface( | |
| 2956 web_contents->GetJavaInterfaces() | |
| 2957 ->CreateInterfaceFactory<blink::mojom::PaymentRequest>()); | |
| 2958 registry->AddInterface( | |
| 2959 web_contents->GetJavaInterfaces() | |
| 2960 ->CreateInterfaceFactory<blink::mojom::ShareService>()); | |
| 2961 } | |
| 2962 #endif | 2951 #endif |
| 2963 } | 2952 } |
| 2964 | 2953 |
| 2965 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess( | 2954 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess( |
| 2966 shell::InterfaceRegistry* registry, | 2955 shell::InterfaceRegistry* registry, |
| 2967 content::GpuProcessHost* render_process_host) { | 2956 content::GpuProcessHost* render_process_host) { |
| 2968 registry->AddInterface( | 2957 registry->AddInterface( |
| 2969 base::Bind(&metrics::CallStackProfileCollector::Create, | 2958 base::Bind(&metrics::CallStackProfileCollector::Create, |
| 2970 metrics::CallStackProfileParams::GPU_PROCESS)); | 2959 metrics::CallStackProfileParams::GPU_PROCESS)); |
| 2971 } | 2960 } |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3211 if (channel <= kMaxDisableEncryptionChannel) { | 3200 if (channel <= kMaxDisableEncryptionChannel) { |
| 3212 static const char* const kWebRtcDevSwitchNames[] = { | 3201 static const char* const kWebRtcDevSwitchNames[] = { |
| 3213 switches::kDisableWebRtcEncryption, | 3202 switches::kDisableWebRtcEncryption, |
| 3214 }; | 3203 }; |
| 3215 to_command_line->CopySwitchesFrom(from_command_line, | 3204 to_command_line->CopySwitchesFrom(from_command_line, |
| 3216 kWebRtcDevSwitchNames, | 3205 kWebRtcDevSwitchNames, |
| 3217 arraysize(kWebRtcDevSwitchNames)); | 3206 arraysize(kWebRtcDevSwitchNames)); |
| 3218 } | 3207 } |
| 3219 } | 3208 } |
| 3220 #endif // defined(ENABLE_WEBRTC) | 3209 #endif // defined(ENABLE_WEBRTC) |
| OLD | NEW |