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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1228113004: Put the RenderFrame's ID into a per-frame WebBluetooth, and plumb that back to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@store-request-device-state-in-dispatcher
Patch Set: Initial Created 5 years, 5 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/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 72cfa87b13848fd48e560cbb9c6ca6b9a8346e06..2151e6e25defb9a18fd89085fd2098463131b146 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -21,6 +21,7 @@
#include "base/time/time.h"
#include "cc/base/switches.h"
#include "content/child/appcache/appcache_dispatcher.h"
+#include "content/child/bluetooth/web_bluetooth_impl.h"
#include "content/child/permissions/permission_dispatcher.h"
#include "content/child/plugin_messages.h"
#include "content/child/quota_dispatcher.h"
@@ -3822,6 +3823,15 @@ void RenderFrameImpl::unregisterProtocolHandler(const WebString& scheme,
user_gesture));
}
+blink::WebBluetooth* RenderFrameImpl::bluetooth() {
+ if (!bluetooth_) {
+ bluetooth_.reset(new WebBluetoothImpl(
+ ChildThreadImpl::current()->thread_safe_sender(), routing_id_));
+ }
+
+ return bluetooth_.get();
+}
+
#if defined(ENABLE_WEBVR)
blink::WebVRClient* RenderFrameImpl::webVRClient() {
if (!vr_dispatcher_)
« content/child/bluetooth/web_bluetooth_impl.cc ('K') | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698