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

Unified Diff: third_party/WebKit/Source/modules/vr/NavigatorVR.cpp

Issue 2394703003: Add deprecation messages to deprecated parts of the WebVR API. (Closed)
Patch Set: Sync/Rebase Created 4 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/vr/NavigatorVR.cpp
diff --git a/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp b/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
index ec49f61e664176189c9eb02eb905e52881ac2b5f..9ef4489c674985325f37a19d9de3a3ccbf984b27 100644
--- a/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
+++ b/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
@@ -57,6 +57,10 @@ ScriptPromise NavigatorVR::getVRDisplays(ScriptState* scriptState) {
}
UseCounter::count(*document, UseCounter::VRGetDisplays);
+ ExecutionContext* executionContext = scriptState->getExecutionContext();
+ String errorMessage;
+ if (!executionContext->isSecureContext(errorMessage))
+ UseCounter::count(*document, UseCounter::VRGetDisplaysInsecureOrigin);
controller()->getDisplays(resolver);
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/modules/vr/VRDisplay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698