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

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

Issue 1153343002: bluetooth: Add BluetoothGATTCharacteristic IDL and Blink interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@bluetooth-get-primary-service-implementation
Patch Set: Added BluetoothGATTCharacteristic to global interface test Created 5 years, 7 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: public/platform/modules/bluetooth/WebBluetooth.h
diff --git a/public/platform/modules/bluetooth/WebBluetooth.h b/public/platform/modules/bluetooth/WebBluetooth.h
index 1a22f2ef84c9ce984854cfad176baeb1b140b002..8dd3d4944cf6788985ba2dea9b7d3ea23fb5ba4c 100644
--- a/public/platform/modules/bluetooth/WebBluetooth.h
+++ b/public/platform/modules/bluetooth/WebBluetooth.h
@@ -12,19 +12,26 @@ namespace blink {
struct WebBluetoothDevice;
struct WebBluetoothError;
+struct WebBluetoothGATTCharacteristic;
struct WebBluetoothGATTRemoteServer;
struct WebBluetoothGATTService;
// Success and failure callbacks for requestDevice.
-// WebBluetoothDevice and WebBluetoothError object ownership is transfered.
+// WebBluetoothDevice and WebBluetoothError object ownership is transferred.
typedef WebCallbacks<WebBluetoothDevice, WebBluetoothError> WebBluetoothRequestDeviceCallbacks;
// Success and failure callbacks for connectGATT.
+// WebBluetoothGATTRemoteServer and WebBluetoothError object ownership is transferred.
typedef WebCallbacks<WebBluetoothGATTRemoteServer, WebBluetoothError> WebBluetoothConnectGATTCallbacks;
// Success and failure callbacks for getPrimaryService.
+// WebBluetoothGATTService and WebBluetoothError object ownership is transferred.
typedef WebCallbacks<WebBluetoothGATTService, WebBluetoothError> WebBluetoothGetPrimaryServiceCallbacks;
+// Success and failure callbacks for getCharacteristic.
+// WebBluetoothCharacteristic and WebBluetoothError object ownership is transferred.
+typedef WebCallbacks<WebBluetoothGATTCharacteristic, WebBluetoothError> WebBluetoothGetCharacteristicCallbacks;
+
class WebBluetooth {
public:
virtual ~WebBluetooth() { }
@@ -47,6 +54,12 @@ public:
const WebString& serviceUUID,
WebBluetoothGetPrimaryServiceCallbacks*) { }
// virtual void getPrimaryServices() { }
+
+ // BluetoothGATTService methods:
+ // See https://webbluetoothcg.github.io/web-bluetooth/#idl-def-bluetoothgattservice
+ virtual void getCharacteristic(const WebString& serviceInstanceID,
+ const WebString& characteristicUUID,
+ WebBluetoothGetCharacteristicCallbacks*) { }
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698