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

Unified Diff: device/vr/android/java/src/org/chromium/device/vr/GvrDeviceProvider.java

Issue 2258513003: Revert of 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 side-by-side diff with in-line comments
Download patch
Index: device/vr/android/java/src/org/chromium/device/vr/GvrDeviceProvider.java
diff --git a/device/vr/android/java/src/org/chromium/device/vr/GvrDeviceProvider.java b/device/vr/android/java/src/org/chromium/device/vr/GvrDeviceProvider.java
deleted file mode 100644
index bf7db8ce024499e4c26392c0b133bf40ed8bbfd3..0000000000000000000000000000000000000000
--- a/device/vr/android/java/src/org/chromium/device/vr/GvrDeviceProvider.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2016 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.
-
-package org.chromium.device.vr;
-
-import android.content.Context;
-
-import com.google.vr.ndk.base.GvrLayout;
-
-import org.chromium.base.annotations.CalledByNative;
-import org.chromium.base.annotations.JNINamespace;
-
-/**
- * This is the implementation of the C++ counterpart GvrDeviceProvider.
- */
-@JNINamespace("device")
-class GvrDeviceProvider {
- private static final String TAG = "GvrDeviceProvider";
- private final GvrLayout mLayout;
- private Thread mGvrInitThread;
-
- private GvrDeviceProvider(Context context) {
- mLayout = new GvrLayout(context);
-
- // Initialize the GVR API on a separate thread to avoid strict mode
- // violations. Note that this doesn't fix the underlying issue of
- // blocking on disk reads here.
- mGvrInitThread = new Thread(new Runnable() {
- @Override
- public void run() {
- mLayout.getGvrApi();
- }
- });
- mGvrInitThread.start();
- }
-
- @CalledByNative
- private static GvrDeviceProvider create(Context context) {
- return new GvrDeviceProvider(context);
- }
-
- @CalledByNative
- private long getNativeContext() {
- try {
- mGvrInitThread.join();
- } catch (Exception ex) {
- }
- return mLayout.getGvrApi().getNativeGvrContext();
- }
-
- @CalledByNative
- private void shutdown() {
- mLayout.shutdown();
- }
-}
« no previous file with comments | « device/vr/android/java/src/org/chromium/device/vr/CardboardVRDevice.java ('k') | device/vr/android/vr_jni_registrar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698