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

Unified Diff: Source/modules/bluetooth/Bluetooth.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 | « no previous file | Source/modules/bluetooth/BluetoothDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/bluetooth/Bluetooth.cpp
diff --git a/Source/modules/bluetooth/Bluetooth.cpp b/Source/modules/bluetooth/Bluetooth.cpp
index 479c62773544f7c6e755dcba592973700d12033b..03b7629a9529699e2988c2339efc4522ea0d1e37 100644
--- a/Source/modules/bluetooth/Bluetooth.cpp
+++ b/Source/modules/bluetooth/Bluetooth.cpp
@@ -12,10 +12,10 @@
#include "core/dom/ExceptionCode.h"
#include "modules/bluetooth/BluetoothDevice.h"
#include "modules/bluetooth/BluetoothError.h"
+#include "modules/bluetooth/BluetoothSupplement.h"
#include "modules/bluetooth/BluetoothUUID.h"
#include "modules/bluetooth/RequestDeviceOptions.h"
#include "platform/UserGestureIndicator.h"
-#include "public/platform/Platform.h"
#include "public/platform/modules/bluetooth/WebBluetooth.h"
#include "public/platform/modules/bluetooth/WebRequestDeviceOptions.h"
@@ -58,7 +58,7 @@ ScriptPromise Bluetooth::requestDevice(ScriptState* scriptState, const RequestDe
return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(SecurityError, "Must be handling a user gesture to show a permission request."));
}
- WebBluetooth* webbluetooth = Platform::current()->bluetooth();
+ WebBluetooth* webbluetooth = BluetoothSupplement::from(scriptState);
if (!webbluetooth)
return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(NotSupportedError));
« no previous file with comments | « no previous file | Source/modules/bluetooth/BluetoothDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698