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

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

Issue 2466223002: Implement WebBluetooth getDescriptor[s] (Closed)
Patch Set: Rebase Created 4 years 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/BluetoothDevice.h
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
index 9d085bce3825fefa469d854dd2ed0abacbcf1dce..31ec02ec367d1bba368423fb903963ae8dd542c2 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
@@ -19,12 +19,14 @@ namespace blink {
class BluetoothAttributeInstanceMap;
class BluetoothRemoteGATTCharacteristic;
+class BluetoothRemoteGATTDescriptor;
class BluetoothRemoteGATTServer;
class BluetoothRemoteGATTService;
class ScriptPromise;
class ScriptPromiseResolver;
struct WebBluetoothRemoteGATTCharacteristicInit;
+struct WebBluetoothRemoteGATTDescriptorInit;
struct WebBluetoothRemoteGATTService;
// BluetoothDevice represents a physical bluetooth device in the DOM. See IDL.
@@ -59,6 +61,11 @@ class BluetoothDevice final : public EventTargetWithInlineData,
BluetoothRemoteGATTService*);
bool isValidCharacteristic(const String& characteristicInstanceId);
+ BluetoothRemoteGATTDescriptor* getOrCreateBluetoothRemoteGATTDescriptor(
+ std::unique_ptr<WebBluetoothRemoteGATTDescriptorInit>,
+ BluetoothRemoteGATTCharacteristic*);
+ bool isValidDescriptor(const String& descriptorInstanceId);
+
// We should disconnect from the device in all of the following cases:
// 1. When the object gets GarbageCollected e.g. it went out of scope.
// dispose() is called in this case.

Powered by Google App Engine
This is Rietveld 408576698