Chromium Code Reviews| 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 ccf8dddbed65daa14f8b0d25c83eeb8ebaf5defe..76e9b3258934c0b54957e1fc79f4b06a875a23a3 100644 |
| --- a/third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h |
| +++ b/third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h |
| @@ -18,6 +18,7 @@ class WebBluetoothRemoteGATTCharacteristic; |
| struct WebBluetoothDeviceInit; |
| struct WebBluetoothRemoteGATTCharacteristicInit; |
| +struct WebBluetoothRemoteGATTDescriptorInit; |
| struct WebBluetoothRemoteGATTService; |
| struct WebRequestDeviceOptions; |
| @@ -41,6 +42,11 @@ using WebBluetoothGetCharacteristicsCallbacks = WebCallbacks< |
| const WebVector<WebBluetoothRemoteGATTCharacteristicInit*>&, |
| int32_t /* Corresponds to WebBluetoothResult in web_bluetooth.mojom */>; |
| +// Success and failure callbacks for getDescriptor(s). |
| +using WebBluetoothGetDescriptorsCallbacks = WebCallbacks< |
| + const WebVector<WebBluetoothRemoteGATTDescriptorInit*>&, |
| + int32_t /* Corresponds to WebBluetoothResult in web_bluetooth.mojom */>; |
| + |
| // Success and failure callbacks for readValue. |
| using WebBluetoothReadValueCallbacks = WebCallbacks< |
| const WebVector<uint8_t>&, |
| @@ -96,15 +102,32 @@ class WebBluetooth { |
| // BluetoothRemoteGATTCharacteristic methods: |
| // See |
| // https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattcharacteristic |
| - virtual void readValue(const WebString& characteristicInstanceID, |
| - WebBluetoothReadValueCallbacks*) {} |
| - virtual void writeValue(const WebString& characteristicInstanceID, |
| - const WebVector<uint8_t>& value, |
| - WebBluetoothWriteValueCallbacks*) {} |
| + virtual void characteristicReadValue( |
| + const WebString& characteristicInstanceID, |
| + WebBluetoothReadValueCallbacks*) {} |
| + virtual void characteristicWriteValue( |
| + const WebString& characteristicInstanceID, |
| + const WebVector<uint8_t>& value, |
| + WebBluetoothWriteValueCallbacks*) {} |
| virtual void startNotifications(const WebString& characteristicInstanceID, |
| WebBluetoothNotificationsCallbacks*) {} |
| virtual void stopNotifications(const WebString& characteristicInstanceID, |
| WebBluetoothNotificationsCallbacks*) {} |
| + virtual void getDescriptors( |
| + const WebString& serviceInstanceID, |
| + // Corresponds to WebBluetoothGATTQueryQuantity in web_bluetooth.mojom |
| + int32_t quantity, |
| + const WebString& descriptorsUUID, |
| + WebBluetoothGetDescriptorsCallbacks*) = 0; |
| + |
| + // BluetoothRemoteGATTDescriptor methods: |
| + // See |
| + // https://webbluetoothchrome.github.io/web-bluetooth/#bluetoothgattdescriptor |
| + virtual void descriptorReadValue(const WebString& descriptorInstanceID, |
|
ortuno
2016/12/02 06:14:51
No need for these yet.
dougt
2016/12/02 18:31:29
Done.
|
| + WebBluetoothReadValueCallbacks*) {} |
| + virtual void descriptorWriteValue(const WebString& descriptorInstanceID, |
| + const WebVector<uint8_t>& value, |
| + WebBluetoothWriteValueCallbacks*) {} |
| // Called when addEventListener is called on a characteristic. |
| virtual void registerCharacteristicObject( |