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

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

Issue 2474863004: bluetooth: Add characteristics to the device's attribute instance map (Closed)
Patch Set: clean up Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
index 7527109d5d84f654d2b19d0e1a33f7619afd3054..8839314554b8073c293e24009db58467733f02bb 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
@@ -76,8 +76,10 @@ class GetCharacteristicsCallback
if (m_quantity == mojom::blink::WebBluetoothGATTQueryQuantity::SINGLE) {
DCHECK_EQ(1u, webCharacteristics.size());
- m_resolver->resolve(BluetoothRemoteGATTCharacteristic::take(
- m_resolver, wrapUnique(webCharacteristics[0]), m_service));
+ m_resolver->resolve(
+ m_service->device()->getOrCreateBluetoothRemoteGATTCharacteristic(
+ m_resolver->getExecutionContext(),
+ wrapUnique(webCharacteristics[0]), m_service));
return;
}
@@ -85,8 +87,10 @@ class GetCharacteristicsCallback
characteristics.reserveInitialCapacity(webCharacteristics.size());
for (WebBluetoothRemoteGATTCharacteristicInit* webCharacteristic :
webCharacteristics) {
- characteristics.append(BluetoothRemoteGATTCharacteristic::take(
- m_resolver, wrapUnique(webCharacteristic), m_service));
+ characteristics.append(
+ m_service->device()->getOrCreateBluetoothRemoteGATTCharacteristic(
+ m_resolver->getExecutionContext(), wrapUnique(webCharacteristic),
+ m_service));
}
m_resolver->resolve(characteristics);
}
« no previous file with comments | « third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698