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

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

Issue 2398103002: Enable magic window mode with new Gvr (Closed)
Patch Set: reviews Created 4 years, 2 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 | « device/vr/android/gvr/gvr_device_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ba4f44c96acd2b8580ae7b2a2553587401d64c80..0000000000000000000000000000000000000000
--- a/device/vr/android/java/src/org/chromium/device/vr/GvrDeviceProvider.java
+++ /dev/null
@@ -1,55 +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 android.os.StrictMode;
-
-import com.google.vr.ndk.base.GvrLayout;
-
-import org.chromium.base.Log;
-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 GvrDeviceProvider(Context context) {
- mLayout = new GvrLayout(context);
- }
-
- @CalledByNative
- private static GvrDeviceProvider create(Context context) {
- return new GvrDeviceProvider(context);
- }
-
- @CalledByNative
- private long getNativeContext() {
- long nativeGvrContext = 0;
-
- StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
-
- try {
- nativeGvrContext = mLayout.getGvrApi().getNativeGvrContext();
- } catch (Exception ex) {
- Log.e(TAG, "Unable to instantiate GvrApi", ex);
- return 0;
- } finally {
- StrictMode.setThreadPolicy(oldPolicy);
- }
-
- return nativeGvrContext;
- }
-
- @CalledByNative
- private void shutdown() {
- mLayout.shutdown();
- }
-}
« no previous file with comments | « device/vr/android/gvr/gvr_device_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698