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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrDaydreamApi.java

Issue 2428563003: Launch Chrome when phone inserted into Daydream headset IFF Chrome was the active app (Closed)
Patch Set: review 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
Index: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrDaydreamApi.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrDaydreamApi.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrDaydreamApi.java
new file mode 100644
index 0000000000000000000000000000000000000000..e95ee912e52449ce92d0fcf7ebf6fddb21521273
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrDaydreamApi.java
@@ -0,0 +1,28 @@
+// 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.chrome.browser.vr_shell;
+
+import android.app.PendingIntent;
+
+/**
+ * Abstract away DaydreamImpl class, which may or may not be present at runtime depending on compile
+ * flags.
+ */
+public interface VrDaydreamApi {
+ /**
+ * Register the intent to launch after phone inserted into a Daydream viewer.
+ */
+ void registerDaydreamIntent(PendingIntent pendingIntent);
+
+ /**
+ * Unregister the intent if any.
+ */
+ void unregisterDaydreamIntent();
+
+ /**
+ * Close the private api.
+ */
+ void close();
+}

Powered by Google App Engine
This is Rietveld 408576698