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

Unified Diff: remoting/android/java/src/org/chromium/chromoting/CardboardDesktopActivity.java

Issue 1231153002: Add VR desktop activity structure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add cardboard desktop activity into conditional case Created 5 years, 5 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: remoting/android/java/src/org/chromium/chromoting/CardboardDesktopActivity.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/CardboardDesktopActivity.java b/remoting/android/java/src/org/chromium/chromoting/CardboardDesktopActivity.java
new file mode 100644
index 0000000000000000000000000000000000000000..3843fe6414ecd091ce72994ada37dc43e7c3ff4c
--- /dev/null
+++ b/remoting/android/java/src/org/chromium/chromoting/CardboardDesktopActivity.java
@@ -0,0 +1,29 @@
+// Copyright 2015 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.chromoting;
+
+import android.os.Bundle;
+
+import com.google.vrtoolkit.cardboard.CardboardActivity;
+import com.google.vrtoolkit.cardboard.CardboardView;
+
+/**
+ * Virtual desktop activity for Cardboard.
+ */
+public class CardboardDesktopActivity extends CardboardActivity {
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.cardboard_desktop);
+
+ CardboardView cardboardView = (CardboardView) findViewById(R.id.cardboard_view);
+
+ // Associate a CardboardView.StereoRenderer with cardboardView.
+ cardboardView.setRenderer(new CardboardDesktopRenderer(this));
+
+ // Associate the cardboardView with this activity.
+ setCardboardView(cardboardView);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698