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

Unified Diff: Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp

Issue 1228283003: Attach a WebBluetooth to the LocalFrame and use it if it's available. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@error-enum-cleanup
Patch Set: Always use BluetoothSupplement to get the WebBluetooth instance. Created 5 years, 5 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
« no previous file with comments | « Source/modules/bluetooth/BluetoothError.cpp ('k') | Source/modules/bluetooth/BluetoothGATTRemoteServer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp
diff --git a/Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp b/Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp
index 12d2fca01f5f7653c05b184cf53a9bd4c9797988..3c3e73b958cbdf88b2b218b0654cb4b36d13fa53 100644
--- a/Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp
+++ b/Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp
@@ -11,8 +11,8 @@
#include "core/dom/DOMException.h"
#include "core/dom/ExceptionCode.h"
#include "modules/bluetooth/BluetoothError.h"
+#include "modules/bluetooth/BluetoothSupplement.h"
#include "modules/bluetooth/ConvertWebVectorToArrayBuffer.h"
-#include "public/platform/Platform.h"
#include "public/platform/modules/bluetooth/WebBluetooth.h"
namespace blink {
@@ -32,7 +32,7 @@ BluetoothGATTCharacteristic* BluetoothGATTCharacteristic::take(ScriptPromiseReso
ScriptPromise BluetoothGATTCharacteristic::readValue(ScriptState* scriptState)
{
- WebBluetooth* webbluetooth = Platform::current()->bluetooth();
+ WebBluetooth* webbluetooth = BluetoothSupplement::from(scriptState);
RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();
@@ -43,7 +43,7 @@ ScriptPromise BluetoothGATTCharacteristic::readValue(ScriptState* scriptState)
ScriptPromise BluetoothGATTCharacteristic::writeValue(ScriptState* scriptState, const DOMArrayPiece& value)
{
- WebBluetooth* webbluetooth = Platform::current()->bluetooth();
+ WebBluetooth* webbluetooth = BluetoothSupplement::from(scriptState);
// Partial implementation of writeValue algorithm:
// https://webbluetoothchrome.github.io/web-bluetooth/#dom-bluetoothgattcharacteristic-writevalue
« no previous file with comments | « Source/modules/bluetooth/BluetoothError.cpp ('k') | Source/modules/bluetooth/BluetoothGATTRemoteServer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698