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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2357383002: bluetooth: Add device list retrieval for chrome://bluetooth-internals (Closed)
Patch Set: Move dependency to //chrome/browser:resources target Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index c10195bcbb34828ad8edba2ce8273d2c01ec112c..e3f5cedc2560c9c6e034189901d8200dcfdd0919 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -169,6 +169,8 @@
#include "content/public/common/service_names.h"
#include "content/public/common/url_utils.h"
#include "content/public/common/web_preferences.h"
+#include "device/bluetooth/adapter.h"
+#include "device/bluetooth/public/interfaces/adapter.mojom.h"
#include "device/usb/public/interfaces/chooser_service.mojom.h"
#include "device/usb/public/interfaces/device_manager.mojom.h"
#include "gin/v8_initializer.h"
@@ -1258,6 +1260,8 @@ bool ChromeContentBrowserClient::MayReuseHost(
// If there is currently a prerender in progress for the host provided,
// it may not be shared. We require prerenders to be by themselves in a
// separate process so that we can monitor their resource usage.
+ Profile* profile =
scheib 2016/09/30 04:25:37 Is this a merge glitch? git map-branches will show
+ Profile::FromBrowserContext(process_host->GetBrowserContext());
prerender::PrerenderManager* prerender_manager =
prerender::PrerenderManagerFactory::GetForBrowserContext(
process_host->GetBrowserContext());
@@ -2946,6 +2950,9 @@ void ChromeContentBrowserClient::RegisterRenderFrameMojoInterfaces(
base::Bind(&CreateWebUsbChooserService, render_frame_host));
}
+ registry->AddInterface<bluetooth::mojom::Adapter>(
+ base::Bind(&bluetooth::Adapter::Create));
+
if (!render_frame_host->GetParent()) {
// Register mojo CredentialManager interface only for main frame.
registry->AddInterface(
@@ -2982,6 +2989,8 @@ void ChromeContentBrowserClient::RegisterRenderFrameMojoInterfaces(
registry->AddInterface(
base::Bind(&CastRemotingConnector::CreateRemoterFactory,
render_frame_host));
+ ChromeInterfaceRegistrarAndroid::ExposeInterfacesToFrame(registry,
scheib 2016/09/30 04:25:37 Merge glitch?
+ render_frame_host);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698