Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2379573006: bluetooth: Standardize Bluetooth adapter access in Adapter service. (Closed)
Patch Set: dcheng fixes Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/bluetooth_internals/bluetooth_internals.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 #include "content/public/browser/web_contents.h" 163 #include "content/public/browser/web_contents.h"
164 #include "content/public/common/child_process_host.h" 164 #include "content/public/common/child_process_host.h"
165 #include "content/public/common/content_descriptors.h" 165 #include "content/public/common/content_descriptors.h"
166 #include "content/public/common/content_features.h" 166 #include "content/public/common/content_features.h"
167 #include "content/public/common/content_switches.h" 167 #include "content/public/common/content_switches.h"
168 #include "content/public/common/mojo_shell_connection.h" 168 #include "content/public/common/mojo_shell_connection.h"
169 #include "content/public/common/sandbox_type.h" 169 #include "content/public/common/sandbox_type.h"
170 #include "content/public/common/service_names.h" 170 #include "content/public/common/service_names.h"
171 #include "content/public/common/url_utils.h" 171 #include "content/public/common/url_utils.h"
172 #include "content/public/common/web_preferences.h" 172 #include "content/public/common/web_preferences.h"
173 #include "device/bluetooth/adapter.h" 173 #include "device/bluetooth/adapter_factory.h"
174 #include "device/bluetooth/public/interfaces/adapter.mojom.h" 174 #include "device/bluetooth/public/interfaces/adapter.mojom.h"
175 #include "device/usb/public/interfaces/chooser_service.mojom.h" 175 #include "device/usb/public/interfaces/chooser_service.mojom.h"
176 #include "device/usb/public/interfaces/device_manager.mojom.h" 176 #include "device/usb/public/interfaces/device_manager.mojom.h"
177 #include "gin/v8_initializer.h" 177 #include "gin/v8_initializer.h"
178 #include "net/base/mime_util.h" 178 #include "net/base/mime_util.h"
179 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 179 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
180 #include "net/cookies/canonical_cookie.h" 180 #include "net/cookies/canonical_cookie.h"
181 #include "net/cookies/cookie_options.h" 181 #include "net/cookies/cookie_options.h"
182 #include "net/ssl/ssl_cert_request_info.h" 182 #include "net/ssl/ssl_cert_request_info.h"
183 #include "ppapi/host/ppapi_host.h" 183 #include "ppapi/host/ppapi_host.h"
(...skipping 2789 matching lines...) Expand 10 before | Expand all | Expand 10 after
2973 !render_frame_host->GetSiteInstance()->GetSiteURL().SchemeIs( 2973 !render_frame_host->GetSiteInstance()->GetSiteURL().SchemeIs(
2974 extensions::kExtensionScheme) 2974 extensions::kExtensionScheme)
2975 #endif 2975 #endif
2976 ) { 2976 ) {
2977 registry->AddInterface( 2977 registry->AddInterface(
2978 base::Bind(&CreateUsbDeviceManager, render_frame_host)); 2978 base::Bind(&CreateUsbDeviceManager, render_frame_host));
2979 registry->AddInterface( 2979 registry->AddInterface(
2980 base::Bind(&CreateWebUsbChooserService, render_frame_host)); 2980 base::Bind(&CreateWebUsbChooserService, render_frame_host));
2981 } 2981 }
2982 2982
2983 registry->AddInterface<bluetooth::mojom::Adapter>( 2983 registry->AddInterface<bluetooth::mojom::AdapterFactory>(
2984 base::Bind(&bluetooth::Adapter::Create)); 2984 base::Bind(&bluetooth::AdapterFactory::Create));
2985 2985
2986 if (!render_frame_host->GetParent()) { 2986 if (!render_frame_host->GetParent()) {
2987 // Register mojo CredentialManager interface only for main frame. 2987 // Register mojo CredentialManager interface only for main frame.
2988 registry->AddInterface( 2988 registry->AddInterface(
2989 base::Bind(&ChromePasswordManagerClient::BindCredentialManager, 2989 base::Bind(&ChromePasswordManagerClient::BindCredentialManager,
2990 render_frame_host)); 2990 render_frame_host));
2991 // Register mojo ContentTranslateDriver interface only for main frame. 2991 // Register mojo ContentTranslateDriver interface only for main frame.
2992 registry->AddInterface(base::Bind( 2992 registry->AddInterface(base::Bind(
2993 &ChromeTranslateClient::BindContentTranslateDriver, render_frame_host)); 2993 &ChromeTranslateClient::BindContentTranslateDriver, render_frame_host));
2994 } 2994 }
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
3279 if (channel <= kMaxDisableEncryptionChannel) { 3279 if (channel <= kMaxDisableEncryptionChannel) {
3280 static const char* const kWebRtcDevSwitchNames[] = { 3280 static const char* const kWebRtcDevSwitchNames[] = {
3281 switches::kDisableWebRtcEncryption, 3281 switches::kDisableWebRtcEncryption,
3282 }; 3282 };
3283 to_command_line->CopySwitchesFrom(from_command_line, 3283 to_command_line->CopySwitchesFrom(from_command_line,
3284 kWebRtcDevSwitchNames, 3284 kWebRtcDevSwitchNames,
3285 arraysize(kWebRtcDevSwitchNames)); 3285 arraysize(kWebRtcDevSwitchNames));
3286 } 3286 }
3287 } 3287 }
3288 #endif // defined(ENABLE_WEBRTC) 3288 #endif // defined(ENABLE_WEBRTC)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/bluetooth_internals/bluetooth_internals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698