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

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: 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/VRDisplay.cpp
diff --git a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
index 6183d47c5da642556600912a24a967dc3049998a..eb5950d44d394193f96dc9d3ae47e35d98459849 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
@@ -97,10 +97,6 @@ bool VRDisplay::getFrameData(VRFrameData* frameData) {
}
VRPose* VRDisplay::getPose() {
- Document* document = m_navigatorVR->document();
- if (document)
- UseCounter::count(*document, UseCounter::VRDeprecatedGetPose);
-
updatePose();
if (!m_framePose)
@@ -149,6 +145,14 @@ void VRDisplay::cancelAnimationFrame(int id) {
ScriptPromise VRDisplay::requestPresent(ScriptState* scriptState,
const HeapVector<VRLayer>& layers) {
+ ExecutionContext* executionContext = scriptState->getExecutionContext();
+ UseCounter::count(executionContext, UseCounter::VRRequestPresent);
+ String errorMessage;
+ if (!executionContext->isSecureContext(errorMessage)) {
+ UseCounter::count(executionContext,
+ UseCounter::VRRequestPresentInsecureOrigin);
+ }
+
ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();
« no previous file with comments | « third_party/WebKit/Source/modules/vr/NavigatorVR.cpp ('k') | third_party/WebKit/Source/modules/vr/VRDisplay.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698