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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrCoreInfo.java

Issue 2865463003: Tracks GVR version crossed with headset type using UMA. (Closed)
Patch Set: Fixed comments Created 3 years, 6 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: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrCoreInfo.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrCoreInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrCoreInfo.java
new file mode 100644
index 0000000000000000000000000000000000000000..7683397bf23a6fc9e7fc998a4239e3a0d6ad06f7
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrCoreInfo.java
@@ -0,0 +1,44 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.vr_shell;
+
+import org.chromium.base.annotations.JNINamespace;
+
+/**
+ * Container class to provide the version and the compatibility with Chrome of the installed VrCore.
+ */
+@JNINamespace("vr_shell")
+public class VrCoreInfo {
+ /** Represents the version of the installed GVR SDK. */
+ public static class GvrVersion {
+ public final int majorVersion;
+ public final int minorVersion;
+ public final int patchVersion;
+
+ public GvrVersion(int majorVersion, int minorVersion, int patchVersion) {
+ this.majorVersion = majorVersion;
+ this.minorVersion = minorVersion;
+ this.patchVersion = patchVersion;
+ }
+ }
+
+ public final GvrVersion gvrVersion;
+ @VrCoreCompatibility
+ public final int compatibility;
+
+ public VrCoreInfo(GvrVersion gvrVersion, int compatibility) {
+ this.gvrVersion = gvrVersion;
+ this.compatibility = compatibility;
+ }
+
+ public long makeNativeVrCoreInfo() {
+ return (gvrVersion == null) ? nativeInit(0, 0, 0, compatibility)
+ : nativeInit(gvrVersion.majorVersion, gvrVersion.minorVersion,
+ gvrVersion.patchVersion, compatibility);
+ }
+
+ private native long nativeInit(
+ int majorVersion, int minorVersion, int patchVersion, int compatibility);
+}
« no previous file with comments | « chrome/android/BUILD.gn ('k') | chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrCoreVersionChecker.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698