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

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

Issue 2924593002: VR: Use system back button behaviour while in ChromeTabbedActivity. (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
index 82b7ca070282e00bc0785c2717d280dcec8f50b2..5e311dc3be3577ae4d1574ea49b6527950a4847c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -1730,6 +1730,12 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
// exit Chrome on top of closing the tab
final boolean minimizeApp = !shouldCloseTab || currentTab.isCreatedForExternalApp();
if (minimizeApp) {
+ // TODO(mthiesse): We never want to close Chrome through the in-vr back button (but we
+ // want to reuse CTA logic for how the back button should otherwise behave). We should
+ // refactor the behaviour in this function so that we can either re-use the parts of
+ // this behaviour we want, or be able to know in advance whether or not clicking the
+ // back button would close Chrome so that we can disable it.
+ if (VrShellDelegate.isInVr()) return true;
if (shouldCloseTab) {
recordBackPressedUma("Minimized and closed tab", BACK_PRESSED_MINIMIZED_TAB_CLOSED);
mActivityStopMetrics.setStopReason(ActivityStopMetrics.STOP_REASON_BACK_BUTTON);
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698