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

Unified Diff: Source/modules/bluetooth/BluetoothDevice.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/Bluetooth.cpp ('k') | Source/modules/bluetooth/BluetoothError.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/bluetooth/BluetoothDevice.cpp
diff --git a/Source/modules/bluetooth/BluetoothDevice.cpp b/Source/modules/bluetooth/BluetoothDevice.cpp
index 0cff381756d98519a220031d45c6a60979b1dbbc..fc73c11cca9d423cce69d1a8aab591ea7e40f55b 100644
--- a/Source/modules/bluetooth/BluetoothDevice.cpp
+++ b/Source/modules/bluetooth/BluetoothDevice.cpp
@@ -12,7 +12,7 @@
#include "core/dom/ExceptionCode.h"
#include "modules/bluetooth/BluetoothError.h"
#include "modules/bluetooth/BluetoothGATTRemoteServer.h"
-#include "public/platform/Platform.h"
+#include "modules/bluetooth/BluetoothSupplement.h"
#include "public/platform/modules/bluetooth/WebBluetooth.h"
namespace blink {
@@ -77,7 +77,7 @@ Vector<String> BluetoothDevice::uuids()
ScriptPromise BluetoothDevice::connectGATT(ScriptState* scriptState)
{
- WebBluetooth* webbluetooth = Platform::current()->bluetooth();
+ WebBluetooth* webbluetooth = BluetoothSupplement::from(scriptState);
if (!webbluetooth)
return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(NotSupportedError));
RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
« no previous file with comments | « Source/modules/bluetooth/Bluetooth.cpp ('k') | Source/modules/bluetooth/BluetoothError.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698