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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.h

Issue 2466223002: Implement WebBluetooth getDescriptor[s] (Closed)
Patch Set: Rebase Created 4 years, 1 month 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/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.h
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.h
index 1dcdad97f09bfbb68f4c50428628475b6cc37f71..d25d31d661f87054b309a5f19effc0276981ce98 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.h
@@ -81,6 +81,13 @@ class BluetoothRemoteGATTCharacteristic final
String uuid() { return m_webCharacteristic->uuid; }
BluetoothCharacteristicProperties* properties() { return m_properties; }
DOMDataView* value() const { return m_value; }
+ ScriptPromise getDescriptor(ScriptState*,
+ const StringOrUnsignedLong& descriptor,
+ ExceptionState&);
+ ScriptPromise getDescriptors(ScriptState*, ExceptionState&);
+ ScriptPromise getDescriptors(ScriptState*,
+ const StringOrUnsignedLong& descriptor,
+ ExceptionState&);
ScriptPromise readValue(ScriptState*);
ScriptPromise writeValue(ScriptState*, const DOMArrayPiece&);
ScriptPromise startNotifications(ScriptState*);
@@ -94,12 +101,18 @@ class BluetoothRemoteGATTCharacteristic final
RegisteredEventListener&) override;
private:
- friend class ReadValueCallback;
- friend class WriteValueCallback;
+ friend class CharacteristicReadValueCallback;
+ friend class CharacteristicWriteValueCallback;
friend class NotificationsCallback;
+ friend class GetDescriptorsCallback;
+ friend class BluetoothRemoteGATTDescriptor;
BluetoothRemoteGATTServer* gatt() { return m_service->device()->gatt(); }
+ ScriptPromise getDescriptorsImpl(ScriptState*,
+ mojom::blink::WebBluetoothGATTQueryQuantity,
+ const String& descriptorUUID = String());
+
std::unique_ptr<WebBluetoothRemoteGATTCharacteristicInit> m_webCharacteristic;
Member<BluetoothRemoteGATTService> m_service;
bool m_stopped;

Powered by Google App Engine
This is Rietveld 408576698