Index: content/renderer/bluetooth/web_bluetooth_impl.h |
diff --git a/content/renderer/bluetooth/web_bluetooth_impl.h b/content/renderer/bluetooth/web_bluetooth_impl.h |
index 431a4e4ae004b9b71c9db060d756474c0bbbc14a..55371fd0912abc25b1bccfef7ac7ba22f75cb1b8 100644 |
--- a/content/renderer/bluetooth/web_bluetooth_impl.h |
+++ b/content/renderer/bluetooth/web_bluetooth_impl.h |
@@ -64,11 +64,13 @@ class CONTENT_EXPORT WebBluetoothImpl |
web_bluetooth.mojom */, |
const blink::WebString& characteristics_uuid, |
blink::WebBluetoothGetCharacteristicsCallbacks* callbacks) override; |
- void readValue(const blink::WebString& characteristic_instance_id, |
- blink::WebBluetoothReadValueCallbacks* callbacks) override; |
- void writeValue(const blink::WebString& characteristic_instance_id, |
- const blink::WebVector<uint8_t>& value, |
- blink::WebBluetoothWriteValueCallbacks*) override; |
+ void characteristicReadValue( |
+ const blink::WebString& characteristic_instance_id, |
+ blink::WebBluetoothReadValueCallbacks* callbacks) override; |
+ void characteristicWriteValue( |
+ const blink::WebString& characteristic_instance_id, |
+ const blink::WebVector<uint8_t>& value, |
+ blink::WebBluetoothWriteValueCallbacks*) override; |
void startNotifications( |
const blink::WebString& characteristic_instance_id, |
blink::WebBluetoothNotificationsCallbacks*) override; |
@@ -81,6 +83,18 @@ class CONTENT_EXPORT WebBluetoothImpl |
void registerCharacteristicObject( |
const blink::WebString& characteristic_instance_id, |
blink::WebBluetoothRemoteGATTCharacteristic* characteristic) override; |
+ void getDescriptors( |
+ const blink::WebString& characteristic_instance_id, |
+ int32_t quantity /* Corresponds to WebBluetoothGATTQueryQuantity in |
+ web_bluetooth.mojom */, |
+ const blink::WebString& descriptor_uuid, |
+ blink::WebBluetoothGetDescriptorsCallbacks* callbacks) override; |
+ void descriptorReadValue( |
ortuno
2016/12/02 06:14:50
No need for these since we don't implement it yet.
dougt
2016/12/02 18:31:28
Done.
|
+ const blink::WebString& descriptor_instance_id, |
+ blink::WebBluetoothReadValueCallbacks* callbacks) override; |
+ void descriptorWriteValue(const blink::WebString& descriptor_instance_id, |
+ const blink::WebVector<uint8_t>& value, |
+ blink::WebBluetoothWriteValueCallbacks*) override; |
private: |
struct GetCharacteristicsCallback; |
@@ -88,6 +102,7 @@ class CONTENT_EXPORT WebBluetoothImpl |
void RemoteCharacteristicValueChanged( |
const std::string& characteristic_instance_id, |
const std::vector<uint8_t>& value) override; |
+ |
void GattServerDisconnected(const WebBluetoothDeviceId& device_id) override; |
// Callbacks for WebBluetoothService calls: |
@@ -107,7 +122,7 @@ class CONTENT_EXPORT WebBluetoothImpl |
std::vector<blink::mojom::WebBluetoothRemoteGATTServicePtr>> |
services); |
void OnGetCharacteristicsComplete( |
- const blink::WebString& service_instance_id, |
+ const blink::WebString& characteristic_instance_id, |
ortuno
2016/12/02 06:14:50
I think it was correct before i.e. service_instanc
dougt
2016/12/02 18:31:28
Done.
|
std::unique_ptr<blink::WebBluetoothGetCharacteristicsCallbacks> callbacks, |
blink::mojom::WebBluetoothResult result, |
base::Optional< |
@@ -126,7 +141,13 @@ class CONTENT_EXPORT WebBluetoothImpl |
blink::mojom::WebBluetoothResult result); |
void OnStopNotificationsComplete( |
std::unique_ptr<blink::WebBluetoothNotificationsCallbacks> callbacks); |
- |
+ void OnGetDescriptorsComplete( |
+ const blink::WebString& service_instance_id, |
+ std::unique_ptr<blink::WebBluetoothGetDescriptorsCallbacks> callbacks, |
+ blink::mojom::WebBluetoothResult result, |
+ base::Optional< |
+ std::vector<blink::mojom::WebBluetoothRemoteGATTDescriptorPtr>> |
+ descriptors); |
void DispatchCharacteristicValueChanged( |
const std::string& characteristic_instance_id, |
const std::vector<uint8_t>& value); |