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

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: Remove mention of frames from content/child. 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 97ac8777aa2119dbcea544a38f485533535de511..a8047b6685984c3ffcf83665b4f417a81ab831a9 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"
@@ -3813,6 +3814,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/common/bluetooth/bluetooth_messages.h ('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