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

Unified Diff: chrome/browser/android/vr_shell/vr_core_info.cc

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
« no previous file with comments | « chrome/browser/android/vr_shell/vr_core_info.h ('k') | chrome/browser/android/vr_shell/vr_metrics_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_core_info.cc
diff --git a/chrome/browser/android/vr_shell/vr_core_info.cc b/chrome/browser/android/vr_shell/vr_core_info.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6f8b491d66698ea296be5090d2a8cd449f4a18e9
--- /dev/null
+++ b/chrome/browser/android/vr_shell/vr_core_info.cc
@@ -0,0 +1,40 @@
+// 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.
+
+#include "chrome/browser/android/vr_shell/vr_core_info.h"
+
+#include "base/android/jni_android.h"
+#include "jni/VrCoreInfo_jni.h"
+
+using base::android::JavaParamRef;
+
+namespace vr_shell {
+
+VrCoreInfo::VrCoreInfo(int32_t major_version,
+ int32_t minor_version,
+ int32_t patch_version,
+ VrCoreCompatibility compatibility)
+ : gvr_sdk_version({major_version, minor_version, patch_version}),
+ compatibility(compatibility) {}
+
+// ----------------------------------------------------------------------------
+// Native JNI methods
+// ----------------------------------------------------------------------------
+
+bool RegisterVrCoreInfo(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+
+jlong Init(JNIEnv* env,
+ const JavaParamRef<jobject>& obj,
+ jint major_version,
+ jint minor_version,
+ jint patch_version,
+ jint compatibility) {
+ return reinterpret_cast<intptr_t>(
+ new VrCoreInfo(major_version, minor_version, patch_version,
+ static_cast<VrCoreCompatibility>(compatibility)));
+}
+
+} // namespace vr_shell
« no previous file with comments | « chrome/browser/android/vr_shell/vr_core_info.h ('k') | chrome/browser/android/vr_shell/vr_metrics_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698