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

Unified Diff: content/renderer/bluetooth/web_bluetooth_impl.cc

Issue 1334763002: bluetooth: Subscribe to notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-origin
Patch Set: Keep track of objects on the renderer side Created 5 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: content/renderer/bluetooth/web_bluetooth_impl.cc
diff --git a/content/renderer/bluetooth/web_bluetooth_impl.cc b/content/renderer/bluetooth/web_bluetooth_impl.cc
index 8c6e7e3c971456d0aa57b43dffaec6074baeca4a..20b5dae64858d409036bbad3a9df76509681ca9b 100644
--- a/content/renderer/bluetooth/web_bluetooth_impl.cc
+++ b/content/renderer/bluetooth/web_bluetooth_impl.cc
@@ -61,6 +61,29 @@ void WebBluetoothImpl::writeValue(
GetDispatcher()->writeValue(characteristic_instance_id, value, callbacks);
}
+void WebBluetoothImpl::startNotifications(
+ const blink::WebString& characteristic_instance_id,
+ blink::WebBluetoothGATTCharacteristicDelegate* delegate,
+ blink::WebBluetoothNotificationsCallbacks* callbacks) {
+ GetDispatcher()->startNotifications(characteristic_instance_id, delegate,
+ callbacks);
+}
+
+void WebBluetoothImpl::stopNotifications(
+ const blink::WebString& characteristic_instance_id,
+ blink::WebBluetoothGATTCharacteristicDelegate* delegate,
+ blink::WebBluetoothNotificationsCallbacks* callbacks) {
+ GetDispatcher()->stopNotifications(characteristic_instance_id, delegate,
+ callbacks);
+}
+
+void WebBluetoothImpl::characteristicDelegateRemoved(
+ const blink::WebString& characteristic_instance_id,
+ blink::WebBluetoothGATTCharacteristicDelegate* delegate) {
+ GetDispatcher()->characteristicDelegateRemoved(characteristic_instance_id,
+ delegate);
+}
+
BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() {
return BluetoothDispatcher::GetOrCreateThreadSpecificInstance(
thread_safe_sender_.get());

Powered by Google App Engine
This is Rietveld 408576698