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

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 scheib'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
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/child/mojo/type_converters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 07ef7a13087ed77d298027b432dec3ada2d63e53..5635ea3c47dbc3e12f0f54c009da9de81b58a2c7 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -18,6 +18,7 @@
#include "content/browser/accessibility/ax_tree_id_registry.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/accessibility/browser_accessibility_state_impl.h"
+#include "content/browser/bluetooth/web_bluetooth_service_impl.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/devtools/render_frame_devtools_agent_host.h"
@@ -1897,6 +1898,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));
@@ -2731,4 +2739,11 @@ void RenderFrameHostImpl::AXContentTreeDataToAXTreeData(
dst->focused_tree_id = focused_frame->GetAXTreeID();
}
+void RenderFrameHostImpl::CreateWebBluetoothService(
+ blink::mojom::WebBluetoothServiceRequest request) {
+ DCHECK(!web_bluetooth_service_);
+ web_bluetooth_service_.reset(
+ new WebBluetoothServiceImpl(this, std::move(request)));
+}
+
} // namespace content
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/child/mojo/type_converters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698