| Index: third_party/WebKit/Source/modules/bluetooth/BluetoothAttributeInstanceMap.h
|
| diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothAttributeInstanceMap.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothAttributeInstanceMap.h
|
| index 17177a84555178f54514bfa6707e62c7538f6060..fc7e15ba6934cb4a2dbadefa630bfa5fc5aab9e1 100644
|
| --- a/third_party/WebKit/Source/modules/bluetooth/BluetoothAttributeInstanceMap.h
|
| +++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothAttributeInstanceMap.h
|
| @@ -6,6 +6,7 @@
|
| #define BluetoothAttributeInstanceMap_h
|
|
|
| #include "modules/bluetooth/BluetoothRemoteGATTCharacteristic.h"
|
| +#include "modules/bluetooth/BluetoothRemoteGATTDescriptor.h"
|
| #include "modules/bluetooth/BluetoothRemoteGATTService.h"
|
| #include "platform/heap/Handle.h"
|
| #include "platform/heap/Heap.h"
|
| @@ -53,6 +54,18 @@ class BluetoothAttributeInstanceMap final
|
| // |characteristicInstanceId| is in the map.
|
| bool containsCharacteristic(const String& characteristicInstanceId);
|
|
|
| + // Constructs a new BluetoothRemoteGATTDescriptor object if there was no
|
| + // descriptor with the same instance id and adds it to the map.
|
| + // Otherwise returns the BluetoothRemoteGATTDescriptor object already in
|
| + // the map.
|
| + BluetoothRemoteGATTDescriptor* getOrCreateBluetoothRemoteGATTDescriptor(
|
| + std::unique_ptr<WebBluetoothRemoteGATTDescriptorInit>,
|
| + BluetoothRemoteGATTCharacteristic*);
|
| +
|
| + // Returns true if a BluetoothRemoteGATTDescriptor with
|
| + // |descriptorInstanceId| is in the map.
|
| + bool containsDescriptor(const String& descriptorInstanceId);
|
| +
|
| // Removes all Attributes from the map.
|
| // TODO(crbug.com/654950): Remove descriptors when implemented.
|
| void Clear();
|
| @@ -67,6 +80,9 @@ class BluetoothAttributeInstanceMap final
|
| // Map of characteristic instance ids to objects.
|
| HeapHashMap<String, Member<BluetoothRemoteGATTCharacteristic>>
|
| m_characteristicIdToObject;
|
| + // Map of descriptor instance ids to objects.
|
| + HeapHashMap<String, Member<BluetoothRemoteGATTDescriptor>>
|
| + m_descriptorIdToObject;
|
| };
|
|
|
| } // namespace blink
|
|
|