Index: third_party/WebKit/Source/modules/bluetooth/BluetoothAttributeInstanceMap.cpp |
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothAttributeInstanceMap.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothAttributeInstanceMap.cpp |
index f58be91213ca31276baaaa8b454be0eae341644e..63d328347268188c9fa48b61800cf78601bd66aa 100644 |
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothAttributeInstanceMap.cpp |
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothAttributeInstanceMap.cpp |
@@ -6,8 +6,6 @@ |
#include "modules/bluetooth/BluetoothDevice.h" |
#include "modules/bluetooth/BluetoothRemoteGATTService.h" |
-#include "public/platform/modules/bluetooth/WebBluetoothRemoteGATTCharacteristicInit.h" |
-#include "public/platform/modules/bluetooth/WebBluetoothRemoteGATTService.h" |
#include <memory> |
#include <utility> |
@@ -19,15 +17,16 @@ BluetoothAttributeInstanceMap::BluetoothAttributeInstanceMap( |
BluetoothRemoteGATTService* |
BluetoothAttributeInstanceMap::getOrCreateBluetoothRemoteGATTService( |
- std::unique_ptr<WebBluetoothRemoteGATTService> webService) { |
- String serviceInstanceId = webService->serviceInstanceID; |
- |
+ const String& serviceInstanceId, |
+ const String& uuid, |
+ bool isPrimary, |
+ const String& deviceInstanceId) { |
BluetoothRemoteGATTService* service = |
m_serviceIdToObject.get(serviceInstanceId); |
if (!service) { |
- service = |
- new BluetoothRemoteGATTService(std::move(webService), m_device.get()); |
+ service = new BluetoothRemoteGATTService(serviceInstanceId, uuid, isPrimary, |
+ deviceInstanceId, m_device); |
m_serviceIdToObject.add(serviceInstanceId, service); |
} |
@@ -42,16 +41,18 @@ bool BluetoothAttributeInstanceMap::containsService( |
BluetoothRemoteGATTCharacteristic* |
BluetoothAttributeInstanceMap::getOrCreateBluetoothRemoteGATTCharacteristic( |
ExecutionContext* context, |
- std::unique_ptr<WebBluetoothRemoteGATTCharacteristicInit> webCharacteristic, |
+ const String& characteristicInstanceId, |
+ const String& serviceInstanceId, |
+ const String& uuid, |
+ uint32_t characteristicProperties, |
BluetoothRemoteGATTService* service) { |
- String characteristicInstanceId = webCharacteristic->characteristicInstanceID; |
- |
BluetoothRemoteGATTCharacteristic* characteristic = |
m_characteristicIdToObject.get(characteristicInstanceId); |
if (!characteristic) { |
characteristic = BluetoothRemoteGATTCharacteristic::create( |
- context, std::move(webCharacteristic), service); |
+ context, characteristicInstanceId, serviceInstanceId, uuid, |
+ characteristicProperties, service, m_device); |
m_characteristicIdToObject.add(characteristicInstanceId, characteristic); |
} |