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

Side by Side Diff: device/vr/android/java/src/org/chromium/device/vr/GoogleVRDeviceProvider.java

Issue 2219203002: Migrate WebVR Cardboard implementation to GVR (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gvr_third_party
Patch Set: Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved.
bshe 2016/08/08 21:43:40 2016 :)
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.device.vr;
6
7 import android.content.Context;
8
9 import com.google.vr.ndk.base.GvrLayout;
10
11 import org.chromium.base.annotations.CalledByNative;
12 import org.chromium.base.annotations.JNINamespace;
13
14 /**
15 * This is the implementation of the C++ counterpart GoogleVRDeviceProvider.
16 */
17 @JNINamespace("device")
18 class GoogleVRDeviceProvider {
19 private static final String TAG = "GoogleVRDeviceProvider";
20 private final GvrLayout mLayout;
21
22 private GoogleVRDeviceProvider(Context context) {
23 mLayout = new GvrLayout(context);
24 }
25
26 @CalledByNative
27 private static GoogleVRDeviceProvider create(Context context) {
28 return new GoogleVRDeviceProvider(context);
29 }
30
31 @CalledByNative
32 private long getNativeContext() {
33 return mLayout.getGvrApi().getNativeGvrContext();
34 }
35
36 @CalledByNative
37 private void shutdown() {
38 mLayout.shutdown();
39 }
40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698