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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.vr_shell;
6
7 import org.chromium.base.annotations.JNINamespace;
8
9 /**
10 * Container class to provide the version and the compatibility with Chrome of t he installed VrCore.
11 */
12 @JNINamespace("vr_shell")
13 public class VrCoreInfo {
14 /** Represents the version of the installed GVR SDK. */
15 public static class GvrVersion {
16 public final int majorVersion;
17 public final int minorVersion;
18 public final int patchVersion;
19
20 public GvrVersion(int majorVersion, int minorVersion, int patchVersion) {
21 this.majorVersion = majorVersion;
22 this.minorVersion = minorVersion;
23 this.patchVersion = patchVersion;
24 }
25 }
26
27 public final GvrVersion gvrVersion;
28 @VrCoreCompatibility
29 public final int compatibility;
30
31 public VrCoreInfo(GvrVersion gvrVersion, int compatibility) {
32 this.gvrVersion = gvrVersion;
33 this.compatibility = compatibility;
34 }
35
36 public long makeNativeVrCoreInfo() {
37 return (gvrVersion == null) ? nativeInit(0, 0, 0, compatibility)
38 : nativeInit(gvrVersion.majorVersion, gvrVer sion.minorVersion,
39 gvrVersion.patchVersion, compatibi lity);
40 }
41
42 private native long nativeInit(
43 int majorVersion, int minorVersion, int patchVersion, int compatibil ity);
44 }
OLDNEW
« 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