Chromium Code Reviews| Index: chrome/browser/android/vr_shell/vr_usage_monitor.h |
| diff --git a/chrome/browser/android/vr_shell/vr_usage_monitor.h b/chrome/browser/android/vr_shell/vr_usage_monitor.h |
| index 594f34841f07235fb3327585e4050f6857269520..21fa392d144d9ef0e33371d090ab2096d193a449 100644 |
| --- a/chrome/browser/android/vr_shell/vr_usage_monitor.h |
| +++ b/chrome/browser/android/vr_shell/vr_usage_monitor.h |
| @@ -12,6 +12,10 @@ |
| #include "content/public/browser/navigation_handle.h" |
| #include "content/public/browser/web_contents.h" |
| #include "content/public/browser/web_contents_observer.h" |
| +#ifdef ANDROID |
| +#include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr.h" |
|
ddorwin
2017/05/16 00:15:51
We should avoid adding GVR dependencies to more fi
tiborg
2017/05/23 15:47:25
Ok, moved it to a separate file.
|
| +#include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr_types.h" |
| +#endif // ANDROID |
| namespace vr_shell { |
| @@ -53,6 +57,34 @@ class SessionTimer { |
| DISALLOW_COPY_AND_ASSIGN(SessionTimer); |
| }; |
| +enum class ViewerType { |
| + UNKNOWN_TYPE = 0, |
| + CARDBOARD = 1, |
| + DAYDREAM = 2, |
| + VIEWER_TYPE_MAX, |
| +}; |
| + |
| +enum GvrVersionStatus { OLDER, UNKNOWN, PRECISE }; |
| + |
| +class VrMetricsUtil { |
| + public: |
| +#ifdef ANDROID |
| + static void LogGvrVersionForVrViewerType(gvr_context* context, |
| + GvrVersionStatus version_status, |
| + gvr_version version); |
| + static void LogVrViewerType(gvr_context* context); |
| +#endif // ANDROID |
| + |
| + private: |
| +#ifdef ANDROID |
| + static ViewerType GetVrViewerType(gvr_context* context); |
| + |
| + static bool logged_gvr_version_; |
|
ddorwin
2017/05/16 00:15:51
has_...
tiborg
2017/05/23 15:47:25
Done.
|
| +#endif // ANDROID |
| + |
| + DISALLOW_IMPLICIT_CONSTRUCTORS(VrMetricsUtil); |
| +}; |
| + |
| // This class is not threadsafe and must only be used from the main thread. |
| class VrMetricsHelper : public content::WebContentsObserver { |
| public: |