Chromium Code Reviews| 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..7e6eed9930332abb5b610cbd8d8b00b75465d1cd 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.get()); |
|
Reilly Grant (use Gerrit)
2016/12/20 02:08:17
.get() shouldn't be necessary here.
juncai
2016/12/20 22:33:42
Done.
|
| 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); |
| } |