| 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..673b391ad3f4df680c6f85771849f7a7c130694d
|
| --- /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_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
|
|
|