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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothAttributeInstanceMap.cpp

Issue 2565913002: [Onion Soup] Move WebBluetoothImpl from //content/renderer/bluetooth to Blink's bluetooth module (Closed)
Patch Set: renamed BluetoothUUID.typemap to Bluetooth.typemap Created 3 years, 12 months 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/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);
}

Powered by Google App Engine
This is Rietveld 408576698