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

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

Issue 2357383002: bluetooth: Add device list retrieval for chrome://bluetooth-internals (Closed)
Patch Set: Remove scoped_refptr get calls 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
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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
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"
172 #include "device/usb/public/interfaces/chooser_service.mojom.h" 174 #include "device/usb/public/interfaces/chooser_service.mojom.h"
173 #include "device/usb/public/interfaces/device_manager.mojom.h" 175 #include "device/usb/public/interfaces/device_manager.mojom.h"
174 #include "gin/v8_initializer.h" 176 #include "gin/v8_initializer.h"
175 #include "net/base/mime_util.h" 177 #include "net/base/mime_util.h"
176 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 178 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
177 #include "net/cookies/canonical_cookie.h" 179 #include "net/cookies/canonical_cookie.h"
178 #include "net/cookies/cookie_options.h" 180 #include "net/cookies/cookie_options.h"
179 #include "net/ssl/ssl_cert_request_info.h" 181 #include "net/ssl/ssl_cert_request_info.h"
180 #include "ppapi/host/ppapi_host.h" 182 #include "ppapi/host/ppapi_host.h"
181 #include "services/shell/public/cpp/interface_provider.h" 183 #include "services/shell/public/cpp/interface_provider.h"
(...skipping 2774 matching lines...) Expand 10 before | Expand all | Expand 10 after
2956 !render_frame_host->GetSiteInstance()->GetSiteURL().SchemeIs( 2958 !render_frame_host->GetSiteInstance()->GetSiteURL().SchemeIs(
2957 extensions::kExtensionScheme) 2959 extensions::kExtensionScheme)
2958 #endif 2960 #endif
2959 ) { 2961 ) {
2960 registry->AddInterface( 2962 registry->AddInterface(
2961 base::Bind(&CreateUsbDeviceManager, render_frame_host)); 2963 base::Bind(&CreateUsbDeviceManager, render_frame_host));
2962 registry->AddInterface( 2964 registry->AddInterface(
2963 base::Bind(&CreateWebUsbChooserService, render_frame_host)); 2965 base::Bind(&CreateWebUsbChooserService, render_frame_host));
2964 } 2966 }
2965 2967
2968 registry->AddInterface<bluetooth::mojom::Adapter>(
2969 base::Bind(&bluetooth::Adapter::Create));
2970
2966 if (!render_frame_host->GetParent()) { 2971 if (!render_frame_host->GetParent()) {
2967 // Register mojo CredentialManager interface only for main frame. 2972 // Register mojo CredentialManager interface only for main frame.
2968 registry->AddInterface( 2973 registry->AddInterface(
2969 base::Bind(&ChromePasswordManagerClient::BindCredentialManager, 2974 base::Bind(&ChromePasswordManagerClient::BindCredentialManager,
2970 render_frame_host)); 2975 render_frame_host));
2971 // Register mojo ContentTranslateDriver interface only for main frame. 2976 // Register mojo ContentTranslateDriver interface only for main frame.
2972 registry->AddInterface(base::Bind( 2977 registry->AddInterface(base::Bind(
2973 &ChromeTranslateClient::BindContentTranslateDriver, render_frame_host)); 2978 &ChromeTranslateClient::BindContentTranslateDriver, render_frame_host));
2974 } 2979 }
2975 2980
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
3257 if (channel <= kMaxDisableEncryptionChannel) { 3262 if (channel <= kMaxDisableEncryptionChannel) {
3258 static const char* const kWebRtcDevSwitchNames[] = { 3263 static const char* const kWebRtcDevSwitchNames[] = {
3259 switches::kDisableWebRtcEncryption, 3264 switches::kDisableWebRtcEncryption,
3260 }; 3265 };
3261 to_command_line->CopySwitchesFrom(from_command_line, 3266 to_command_line->CopySwitchesFrom(from_command_line,
3262 kWebRtcDevSwitchNames, 3267 kWebRtcDevSwitchNames,
3263 arraysize(kWebRtcDevSwitchNames)); 3268 arraysize(kWebRtcDevSwitchNames));
3264 } 3269 }
3265 } 3270 }
3266 #endif // defined(ENABLE_WEBRTC) 3271 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698