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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 #include "content/public/browser/web_contents.h" | 162 #include "content/public/browser/web_contents.h" |
163 #include "content/public/common/child_process_host.h" | 163 #include "content/public/common/child_process_host.h" |
164 #include "content/public/common/content_descriptors.h" | 164 #include "content/public/common/content_descriptors.h" |
165 #include "content/public/common/content_features.h" | 165 #include "content/public/common/content_features.h" |
166 #include "content/public/common/content_switches.h" | 166 #include "content/public/common/content_switches.h" |
167 #include "content/public/common/mojo_shell_connection.h" | 167 #include "content/public/common/mojo_shell_connection.h" |
168 #include "content/public/common/sandbox_type.h" | 168 #include "content/public/common/sandbox_type.h" |
169 #include "content/public/common/service_names.h" | 169 #include "content/public/common/service_names.h" |
170 #include "content/public/common/url_utils.h" | 170 #include "content/public/common/url_utils.h" |
171 #include "content/public/common/web_preferences.h" | 171 #include "content/public/common/web_preferences.h" |
172 #include "device/bluetooth/adapter.h" | |
173 #include "device/bluetooth/public/interfaces/adapter.mojom.h" | |
174 #include "device/usb/public/interfaces/chooser_service.mojom.h" | 172 #include "device/usb/public/interfaces/chooser_service.mojom.h" |
175 #include "device/usb/public/interfaces/device_manager.mojom.h" | 173 #include "device/usb/public/interfaces/device_manager.mojom.h" |
176 #include "gin/v8_initializer.h" | 174 #include "gin/v8_initializer.h" |
177 #include "net/base/mime_util.h" | 175 #include "net/base/mime_util.h" |
178 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 176 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
179 #include "net/cookies/canonical_cookie.h" | 177 #include "net/cookies/canonical_cookie.h" |
180 #include "net/cookies/cookie_options.h" | 178 #include "net/cookies/cookie_options.h" |
181 #include "net/ssl/ssl_cert_request_info.h" | 179 #include "net/ssl/ssl_cert_request_info.h" |
182 #include "ppapi/host/ppapi_host.h" | 180 #include "ppapi/host/ppapi_host.h" |
183 #include "services/shell/public/cpp/interface_provider.h" | 181 #include "services/shell/public/cpp/interface_provider.h" |
(...skipping 2774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2958 !render_frame_host->GetSiteInstance()->GetSiteURL().SchemeIs( | 2956 !render_frame_host->GetSiteInstance()->GetSiteURL().SchemeIs( |
2959 extensions::kExtensionScheme) | 2957 extensions::kExtensionScheme) |
2960 #endif | 2958 #endif |
2961 ) { | 2959 ) { |
2962 registry->AddInterface( | 2960 registry->AddInterface( |
2963 base::Bind(&CreateUsbDeviceManager, render_frame_host)); | 2961 base::Bind(&CreateUsbDeviceManager, render_frame_host)); |
2964 registry->AddInterface( | 2962 registry->AddInterface( |
2965 base::Bind(&CreateWebUsbChooserService, render_frame_host)); | 2963 base::Bind(&CreateWebUsbChooserService, render_frame_host)); |
2966 } | 2964 } |
2967 | 2965 |
2968 registry->AddInterface<bluetooth::mojom::Adapter>( | |
2969 base::Bind(&bluetooth::Adapter::Create)); | |
2970 | |
2971 if (!render_frame_host->GetParent()) { | 2966 if (!render_frame_host->GetParent()) { |
2972 // Register mojo CredentialManager interface only for main frame. | 2967 // Register mojo CredentialManager interface only for main frame. |
2973 registry->AddInterface( | 2968 registry->AddInterface( |
2974 base::Bind(&ChromePasswordManagerClient::BindCredentialManager, | 2969 base::Bind(&ChromePasswordManagerClient::BindCredentialManager, |
2975 render_frame_host)); | 2970 render_frame_host)); |
2976 // Register mojo ContentTranslateDriver interface only for main frame. | 2971 // Register mojo ContentTranslateDriver interface only for main frame. |
2977 registry->AddInterface(base::Bind( | 2972 registry->AddInterface(base::Bind( |
2978 &ChromeTranslateClient::BindContentTranslateDriver, render_frame_host)); | 2973 &ChromeTranslateClient::BindContentTranslateDriver, render_frame_host)); |
2979 } | 2974 } |
2980 | 2975 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3262 if (channel <= kMaxDisableEncryptionChannel) { | 3257 if (channel <= kMaxDisableEncryptionChannel) { |
3263 static const char* const kWebRtcDevSwitchNames[] = { | 3258 static const char* const kWebRtcDevSwitchNames[] = { |
3264 switches::kDisableWebRtcEncryption, | 3259 switches::kDisableWebRtcEncryption, |
3265 }; | 3260 }; |
3266 to_command_line->CopySwitchesFrom(from_command_line, | 3261 to_command_line->CopySwitchesFrom(from_command_line, |
3267 kWebRtcDevSwitchNames, | 3262 kWebRtcDevSwitchNames, |
3268 arraysize(kWebRtcDevSwitchNames)); | 3263 arraysize(kWebRtcDevSwitchNames)); |
3269 } | 3264 } |
3270 } | 3265 } |
3271 #endif // defined(ENABLE_WEBRTC) | 3266 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |