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

Unified Diff: Source/modules/bluetooth/BluetoothGATTService.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
Index: Source/modules/bluetooth/BluetoothGATTService.cpp
diff --git a/Source/modules/bluetooth/BluetoothGATTService.cpp b/Source/modules/bluetooth/BluetoothGATTService.cpp
index 7c0d58d171b40916809093bfd835e49bd9d83e54..c6d2ad29c0906088bf79a42e1b6a33b6a56768df 100644
--- a/Source/modules/bluetooth/BluetoothGATTService.cpp
+++ b/Source/modules/bluetooth/BluetoothGATTService.cpp
@@ -12,8 +12,8 @@
#include "core/dom/ExceptionCode.h"
#include "modules/bluetooth/BluetoothError.h"
#include "modules/bluetooth/BluetoothGATTCharacteristic.h"
+#include "modules/bluetooth/BluetoothSupplement.h"
#include "modules/bluetooth/BluetoothUUID.h"
-#include "public/platform/Platform.h"
#include "public/platform/modules/bluetooth/WebBluetooth.h"
namespace blink {
@@ -34,7 +34,7 @@ BluetoothGATTService* BluetoothGATTService::take(ScriptPromiseResolver*, PassOwn
ScriptPromise BluetoothGATTService::getCharacteristic(ScriptState* scriptState,
const StringOrUnsignedLong& characteristic, ExceptionState& exceptionState)
{
- WebBluetooth* webbluetooth = Platform::current()->bluetooth();
+ WebBluetooth* webbluetooth = BluetoothSupplement::from(scriptState);
String characteristicUUID = BluetoothUUID::getCharacteristic(characteristic, exceptionState);
if (exceptionState.hadException())
« no previous file with comments | « Source/modules/bluetooth/BluetoothGATTRemoteServer.cpp ('k') | Source/modules/bluetooth/BluetoothSupplement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698