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