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

Unified Diff: Source/modules/bluetooth/BluetoothGATTRemoteServer.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/BluetoothGATTRemoteServer.cpp
diff --git a/Source/modules/bluetooth/BluetoothGATTRemoteServer.cpp b/Source/modules/bluetooth/BluetoothGATTRemoteServer.cpp
index 1c4da6faaa3a3fac137ebeeb7d3b16fe89db6a0c..07dc5c6b54e0078d2d759bc2d024e2dedf280f13 100644
--- a/Source/modules/bluetooth/BluetoothGATTRemoteServer.cpp
+++ b/Source/modules/bluetooth/BluetoothGATTRemoteServer.cpp
@@ -12,8 +12,8 @@
#include "core/dom/ExceptionCode.h"
#include "modules/bluetooth/BluetoothError.h"
#include "modules/bluetooth/BluetoothGATTService.h"
+#include "modules/bluetooth/BluetoothSupplement.h"
#include "modules/bluetooth/BluetoothUUID.h"
-#include "public/platform/Platform.h"
#include "public/platform/modules/bluetooth/WebBluetooth.h"
#include "wtf/OwnPtr.h"
@@ -31,7 +31,7 @@ BluetoothGATTRemoteServer* BluetoothGATTRemoteServer::take(ScriptPromiseResolver
ScriptPromise BluetoothGATTRemoteServer::getPrimaryService(ScriptState* scriptState, const StringOrUnsignedLong& service, ExceptionState& exceptionState)
{
- WebBluetooth* webbluetooth = Platform::current()->bluetooth();
+ WebBluetooth* webbluetooth = BluetoothSupplement::from(scriptState);
String serviceUUID = BluetoothUUID::getService(service, exceptionState);
if (exceptionState.hadException())
« no previous file with comments | « Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp ('k') | Source/modules/bluetooth/BluetoothGATTService.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698