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

Unified Diff: third_party/WebKit/Source/modules/vr/VRDisplay.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/VRDisplay.cpp
diff --git a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
index a4870e618ba4f50eef7f1c5b818c28c3baf9c063..bb1d94a9904f121d5b1a1547cb209a6798e7802a 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
@@ -104,10 +104,6 @@ bool VRDisplay::getFrameData(VRFrameData* frameData)
VRPose* VRDisplay::getPose()
{
- Document* document = m_navigatorVR->document();
- if (document)
- UseCounter::count(*document, UseCounter::VRDeprecatedGetPose);
amp 2016/10/05 20:43:14 Do we not need this counter anymore?
billorr 2016/10/05 21:01:03 I moved it to the IDL, so it will generate a depre
billorr 2016/10/05 22:47:55 Done.
-
updatePose();
if (!m_framePose)
@@ -161,6 +157,15 @@ void VRDisplay::cancelAnimationFrame(int id)
ScriptPromise VRDisplay::requestPresent(ScriptState* scriptState, const HeapVector<VRLayer>& layers)
{
+ ExecutionContext* executionContext = scriptState->getExecutionContext();
+ String errorMessage;
+ if (executionContext->isSecureContext(errorMessage)) {
ddorwin 2016/10/05 21:32:43 ditto
billorr 2016/10/05 21:55:27 Acknowledged.
billorr 2016/10/05 22:47:55 Done.
+ UseCounter::count(executionContext, UseCounter::VRRequestPresent);
+ } else {
+ UseCounter::count(executionContext,
+ UseCounter::VRRequestPresentInsecureOrigin);
+ }
+
ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();

Powered by Google App Engine
This is Rietveld 408576698