| 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..6eb7d11ebc5faf306fe66fb4e73f6773ae244b61 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,23 @@ 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& characteristicInstanceID,
|
| + // Corresponds to WebBluetoothGATTQueryQuantity in web_bluetooth.mojom
|
| + int32_t quantity,
|
| + const WebString& descriptorsUUID,
|
| + WebBluetoothGetDescriptorsCallbacks*) = 0;
|
|
|
| // Called when addEventListener is called on a characteristic.
|
| virtual void registerCharacteristicObject(
|
|
|