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

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

Issue 1603893002: bluetooth: Switch BluetoothGattCharacteristic.value to DataView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetoothValue
Patch Set: Created 4 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/BluetoothGATTCharacteristic.h
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothGATTCharacteristic.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothGATTCharacteristic.h
index 8e89ce0405ec3537f915c5586d780efbb0ea8e06..0ff54285e58ce142a2274db8f77d47c74669e41e 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothGATTCharacteristic.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothGATTCharacteristic.h
@@ -8,6 +8,7 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/dom/ActiveDOMObject.h"
#include "core/dom/DOMArrayPiece.h"
+#include "core/dom/DOMDataView.h"
#include "modules/EventTargetModules.h"
#include "platform/heap/Handle.h"
#include "public/platform/modules/bluetooth/WebBluetoothGATTCharacteristic.h"
@@ -48,7 +49,7 @@ public:
static BluetoothGATTCharacteristic* take(ScriptPromiseResolver*, PassOwnPtr<WebBluetoothGATTCharacteristicInit>);
// Save value.
- void setValue(const PassRefPtr<DOMArrayBuffer>&);
+ void setValue(const PassRefPtr<DOMDataView>&);
// WebBluetoothGATTCharacteristic interface:
void dispatchCharacteristicValueChanged(const WebVector<uint8_t>&) override;
@@ -75,7 +76,7 @@ public:
String uuid() { return m_webCharacteristic->uuid; }
BluetoothCharacteristicProperties* properties() { return m_properties; }
- PassRefPtr<DOMArrayBuffer> value() const { return m_value; }
+ PassRefPtr<DOMDataView> value() const { return m_value; }
ScriptPromise readValue(ScriptState*);
ScriptPromise writeValue(ScriptState*, const DOMArrayPiece&);
ScriptPromise startNotifications(ScriptState*);
@@ -91,7 +92,7 @@ private:
OwnPtr<WebBluetoothGATTCharacteristicInit> m_webCharacteristic;
bool m_stopped;
Member<BluetoothCharacteristicProperties> m_properties;
- RefPtr<DOMArrayBuffer> m_value;
+ RefPtr<DOMDataView> m_value;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698