Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 } | |
| OLD | NEW |