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

Unified Diff: third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h

Issue 1334763002: bluetooth: Subscribe to notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-origin
Patch Set: Fix global interface test Created 5 years, 2 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: third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h
diff --git a/third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h b/third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h
index 1cd90fbb5e32a6b0aeb3df32fff5b61f32d9ac2e..445c074a22a4dfbc95f93e6b73bf53972379fb6f 100644
--- a/third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h
+++ b/third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h
@@ -14,6 +14,8 @@
namespace blink {
+class WebBluetoothGATTCharacteristic;
+
struct WebBluetoothDevice;
struct WebBluetoothGATTCharacteristicInit;
struct WebBluetoothGATTRemoteServer;
@@ -38,6 +40,10 @@ using WebBluetoothReadValueCallbacks = WebCallbacks<const WebVector<uint8_t>&, c
// Success and failure callbacks for writeValue.
using WebBluetoothWriteValueCallbacks = WebCallbacks<void, const WebBluetoothError&>;
+// Success and failure callbacks for characteristic.startNotifications and
+// characteristic.stopNotifications.
+using WebBluetoothNotificationsCallbacks = WebCallbacks<void, const WebBluetoothError&>;
+
class WebBluetooth {
public:
virtual ~WebBluetooth() { }
@@ -74,6 +80,15 @@ public:
virtual void writeValue(const WebString& characteristicInstanceID,
const std::vector<uint8_t>& value,
WebBluetoothWriteValueCallbacks*) { }
+ virtual void startNotifications(const WebString& characteristicInstanceID,
+ WebBluetoothGATTCharacteristic*,
+ WebBluetoothNotificationsCallbacks*) {}
+ virtual void stopNotifications(const WebString& characteristicInstanceID,
+ WebBluetoothGATTCharacteristic*,
+ WebBluetoothNotificationsCallbacks*) {}
+ virtual void characteristicObjectRemoved(
+ const WebString& characteristicInstanceID,
+ WebBluetoothGATTCharacteristic*) {}
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698