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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.h

Issue 2654403002: Implement WebBluetooth descriptor.writeValue() (Closed)
Patch Set: #4 Created 3 years, 11 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/BluetoothRemoteGATTDescriptor.h
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.h
index b491c1d9860d87043a1fdb276d5202f47223535a..175db616cecd6b36d77be7f651aeab298e4dcc02 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.h
@@ -9,6 +9,7 @@
#include "core/dom/DOMArrayPiece.h"
#include "core/dom/DOMDataView.h"
#include "modules/EventTargetModules.h"
+#include "modules/bluetooth/Bluetooth.h"
#include "modules/bluetooth/BluetoothRemoteGATTCharacteristic.h"
#include "modules/bluetooth/BluetoothRemoteGATTService.h"
#include "platform/heap/Handle.h"
@@ -54,11 +55,18 @@ class BluetoothRemoteGATTDescriptor final
friend class DescriptorReadValueCallback;
BluetoothRemoteGATTServer* getGatt() { return m_characteristic->getGatt(); }
+ mojom::blink::WebBluetoothService* getService() {
+ return m_characteristic->m_device->bluetooth()->service();
+ }
void ReadValueCallback(ScriptPromiseResolver*,
mojom::blink::WebBluetoothResult,
const Optional<Vector<uint8_t>>&);
+ void WriteValueCallback(ScriptPromiseResolver*,
+ const Vector<uint8_t>&,
+ mojom::blink::WebBluetoothResult);
+
mojom::blink::WebBluetoothRemoteGATTDescriptorPtr m_descriptor;
Member<BluetoothRemoteGATTCharacteristic> m_characteristic;
Member<DOMDataView> m_value;

Powered by Google App Engine
This is Rietveld 408576698