| 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 2707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2955 registry->AddInterface( | 2958 registry->AddInterface( |
| 2956 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, | 2959 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, |
| 2957 render_frame_host)); | 2960 render_frame_host)); |
| 2958 | 2961 |
| 2959 registry->AddInterface( | 2962 registry->AddInterface( |
| 2960 base::Bind(&password_manager::ContentPasswordManagerDriverFactory:: | 2963 base::Bind(&password_manager::ContentPasswordManagerDriverFactory:: |
| 2961 BindPasswordManagerDriver, | 2964 BindPasswordManagerDriver, |
| 2962 render_frame_host)); | 2965 render_frame_host)); |
| 2963 | 2966 |
| 2964 #if BUILDFLAG(ANDROID_JAVA_UI) | 2967 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 2965 ChromeInterfaceRegistrarAndroid::ExposeInterfacesToFrame( | 2968 content::WebContents* web_contents = |
| 2966 registry, render_frame_host); | 2969 content::WebContents::FromRenderFrameHost(render_frame_host); |
| 2970 if (web_contents) { |
| 2971 registry->AddInterface( |
| 2972 web_contents->GetJavaInterfaces() |
| 2973 ->CreateInterfaceFactory<blink::mojom::PaymentRequest>()); |
| 2974 registry->AddInterface( |
| 2975 web_contents->GetJavaInterfaces() |
| 2976 ->CreateInterfaceFactory<blink::mojom::ShareService>()); |
| 2977 } |
| 2967 #endif | 2978 #endif |
| 2968 | 2979 |
| 2969 #if defined(ENABLE_MEDIA_ROUTER) | 2980 #if defined(ENABLE_MEDIA_ROUTER) |
| 2970 registry->AddInterface( | 2981 registry->AddInterface( |
| 2971 base::Bind(&CastRemotingConnector::CreateRemoterFactory, | 2982 base::Bind(&CastRemotingConnector::CreateRemoterFactory, |
| 2972 render_frame_host)); | 2983 render_frame_host)); |
| 2973 #endif | 2984 #endif |
| 2974 } | 2985 } |
| 2975 | 2986 |
| 2976 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess( | 2987 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess( |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3222 if (channel <= kMaxDisableEncryptionChannel) { | 3233 if (channel <= kMaxDisableEncryptionChannel) { |
| 3223 static const char* const kWebRtcDevSwitchNames[] = { | 3234 static const char* const kWebRtcDevSwitchNames[] = { |
| 3224 switches::kDisableWebRtcEncryption, | 3235 switches::kDisableWebRtcEncryption, |
| 3225 }; | 3236 }; |
| 3226 to_command_line->CopySwitchesFrom(from_command_line, | 3237 to_command_line->CopySwitchesFrom(from_command_line, |
| 3227 kWebRtcDevSwitchNames, | 3238 kWebRtcDevSwitchNames, |
| 3228 arraysize(kWebRtcDevSwitchNames)); | 3239 arraysize(kWebRtcDevSwitchNames)); |
| 3229 } | 3240 } |
| 3230 } | 3241 } |
| 3231 #endif // defined(ENABLE_WEBRTC) | 3242 #endif // defined(ENABLE_WEBRTC) |
| OLD | NEW |