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

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: 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 356d998a0629dfd7c7dbbd43f929b96511d3fcce..19ac2cc638105030ddc3cf248e9c3f5d4f9f1f29 100644
--- a/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
+++ b/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
@@ -57,6 +57,14 @@ ScriptPromise NavigatorVR::getVRDisplays(ScriptState* scriptState)
return promise;
}
+ ExecutionContext* executionContext = scriptState->getExecutionContext();
+ String errorMessage;
+ if (executionContext->isSecureContext(errorMessage)) {
+ UseCounter::count(*document, UseCounter::VRGetDisplays);
+ } else {
+ UseCounter::count(*document, UseCounter::VRGetDisplaysInsecureOrigin);
+ }
+
UseCounter::count(*document, UseCounter::VRGetDisplays);
amp 2016/10/05 20:43:14 Shouldn't this be removed since you are now counti
billorr 2016/10/05 21:01:03 Acknowledged.
ddorwin 2016/10/05 21:32:43 We definitely don't want to call this twice (thoug
billorr 2016/10/05 21:55:27 Acknowledged.
billorr 2016/10/05 22:47:55 Done.
billorr 2016/10/05 22:47:55 Done.
controller()->getDisplays(resolver);

Powered by Google App Engine
This is Rietveld 408576698