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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1775953004: bluetooth: Move writeValue to mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Address jyasskin's comments Created 4 years, 9 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: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 82a15ffec9791aabf9b24555395067c3b3920db1..5bd89ac2dd72a98c02ff7afdbbb369be1c1cb214 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -1868,6 +1868,13 @@ void RenderFrameHostImpl::RegisterMojoServices() {
GetServiceRegistry()->AddService(base::Bind(
&PresentationServiceImpl::CreateMojoService, base::Unretained(this)));
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableWebBluetooth)) {
+ GetServiceRegistry()->AddService(
+ base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService,
+ base::Unretained(this)));
+ }
+
if (!frame_mojo_shell_)
frame_mojo_shell_.reset(new FrameMojoShell(this));
@@ -2703,4 +2710,10 @@ void RenderFrameHostImpl::AXContentTreeDataToAXTreeData(
dst->focused_tree_id = focused_frame->GetAXTreeID();
}
+void RenderFrameHostImpl::CreateWebBluetoothService(
+ blink::mojom::WebBluetoothServiceRequest request) {
+ web_bluetooth_service_.reset(
Jeffrey Yasskin 2016/03/29 20:30:02 Should we DCHECK that web_bluetooth_service_ hasn'
ortuno 2016/03/29 22:14:04 Done.
+ new WebBluetoothServiceImpl(this, std::move(request)));
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698