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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java

Issue 2829193003: Autopresent WebVR content in CCT if it was opened by a Daydream Intent (Closed)
Patch Set: Created 3 years, 8 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/customtabs/CustomTabActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
index 1157436e4a182369894bf90b8952448673b7d6a9..792432b815571d9a34d7212a8e1fa26c03eb8350 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
@@ -74,6 +74,7 @@ import org.chromium.chrome.browser.tabmodel.TabReparentingParams;
import org.chromium.chrome.browser.toolbar.ToolbarControlContainer;
import org.chromium.chrome.browser.util.ColorUtils;
import org.chromium.chrome.browser.util.UrlUtilities;
+import org.chromium.chrome.browser.vr_shell.VrShellDelegate;
import org.chromium.chrome.browser.widget.findinpage.FindToolbarManager;
import org.chromium.components.dom_distiller.core.DomDistillerUrlUtils;
import org.chromium.content_public.browser.LoadUrlParams;
@@ -532,6 +533,11 @@ public class CustomTabActivity extends ChromeActivity {
super.finishNativeInitialization();
}
+ @Override
+ public final boolean shouldAutoPresent() {
mthiesse 2017/04/21 14:24:27 If you call this shouldAutoPresentOnVrIntent(), yo
bshe 2017/04/21 17:54:01 See below. It looks like VrShellDelegate wont get
+ return VrShellDelegate.isDaydreamVrIntent(getIntent());
mthiesse 2017/04/21 14:24:27 Instead of using getIntent(), you should have VrSh
bshe 2017/04/21 17:54:01 If I understand correctly, onNewIntentWithNative w
mthiesse 2017/04/21 18:35:39 Why look at the intent at all? Why not tie into CC
Yusuf 2017/04/21 23:10:38 I am assuming they dont connect through our servic
bshe 2017/04/24 13:59:12 There is no VR specific way of checking it. For is
+ }
+
/**
* Encapsulates CustomTabsConnection#takeHiddenTab()
* with additional initialization logic.

Powered by Google App Engine
This is Rietveld 408576698