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

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

Issue 2345783002: Added some basic WebVR use counters (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/modules/vr/NavigatorVR.cpp ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0e5f5abd06ad0e28605ee1b4dd45c475140adf71..62d6d4260614e4a8f3349bb4d9c769756304964a 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
@@ -6,6 +6,7 @@
#include "core/dom/DOMException.h"
#include "core/dom/Fullscreen.h"
+#include "core/frame/UseCounter.h"
#include "core/inspector/ConsoleMessage.h"
#include "modules/vr/NavigatorVR.h"
#include "modules/vr/VRController.h"
@@ -97,6 +98,10 @@ bool VRDisplay::getFrameData(VRFrameData* frameData)
VRPose* VRDisplay::getPose()
{
+ Document* document = m_navigatorVR->document();
+ if (document)
+ UseCounter::count(*document, UseCounter::VRDeprecatedGetPose);
+
updatePose();
if (!m_framePose)
@@ -255,6 +260,10 @@ void VRDisplay::beginPresent(ScriptPromiseResolver* resolver)
updateLayerBounds();
+ Document* document = m_navigatorVR->document();
+ if (document)
+ UseCounter::count(*document, UseCounter::VRPresent);
+
resolver->resolve();
m_navigatorVR->fireVRDisplayPresentChange(this);
}
« no previous file with comments | « third_party/WebKit/Source/modules/vr/NavigatorVR.cpp ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698