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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.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
Index: third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
index 2fbb88fd7f6e473e0d698cea5b1e1e263972ef98..36592550950446d5f3d220970c2dbcfdd86a2be7 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
@@ -14,6 +14,7 @@
#include "modules/bluetooth/BluetoothRemoteGATTServer.h"
#include "modules/bluetooth/BluetoothSupplement.h"
#include "public/platform/modules/bluetooth/WebBluetooth.h"
+#include "public/platform/modules/bluetooth/WebBluetoothRemoteGATTCharacteristicInit.h"
#include <memory>
#include <utility>
@@ -49,6 +50,15 @@ bool BluetoothDevice::isValidService(const String& serviceInstanceId) {
return m_attributeInstanceMap->containsService(serviceInstanceId);
}
+BluetoothRemoteGATTCharacteristic*
+BluetoothDevice::getOrCreateBluetoothRemoteGATTCharacteristic(
+ ExecutionContext* context,
+ std::unique_ptr<WebBluetoothRemoteGATTCharacteristicInit> webCharacteristic,
+ BluetoothRemoteGATTService* service) {
+ return m_attributeInstanceMap->getOrCreateBluetoothRemoteGATTCharacteristic(
+ context, std::move(webCharacteristic), service);
+}
+
void BluetoothDevice::dispose() {
disconnectGATTIfConnected();
}

Powered by Google App Engine
This is Rietveld 408576698