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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp

Issue 1334763002: bluetooth: Subscribe to notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-origin
Patch Set: Fix global interface test Created 5 years, 2 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: third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp
index b84c746454fff3f7073519a482a6d6203e080718..9544b38798959e2c300d0bff32055185bb04f87e 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp
@@ -37,10 +37,15 @@ WebBluetooth* BluetoothSupplement::from(LocalFrame* frame)
WebBluetooth* BluetoothSupplement::fromScriptState(ScriptState* scriptState)
{
- if (!scriptState->executionContext()->isDocument()) {
+ return fromExecutionContext(scriptState->executionContext());
+}
+
+WebBluetooth* BluetoothSupplement::fromExecutionContext(ExecutionContext* executionContext)
+{
+ if (!executionContext->isDocument()) {
return nullptr;
}
- return BluetoothSupplement::from(static_cast<Document*>(scriptState->executionContext())->frame());
+ return BluetoothSupplement::from(static_cast<Document*>(executionContext)->frame());
}
DEFINE_TRACE(BluetoothSupplement)
« no previous file with comments | « third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.h ('k') | third_party/WebKit/public/blink_headers.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698