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

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

Issue 2165053002: Enter overview mode if lone tab is closed using back button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | 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 3dea3ad134e0f00981a329b3a84bad5c310d2ab1..8b5a1552711c760cf7299ec4893b092149541d28 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -1212,7 +1212,12 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
+ boolean hasNextTab =
+ getCurrentTabModel().getNextTabIfClosed(tabToClose.getId()) != null;
getCurrentTabModel().closeTab(tabToClose, false, true, false);
+
+ // If there is no next tab to open, enter overview mode.
+ if (!hasNextTab) mLayoutManager.showOverview(false);
}
}, CLOSE_TAB_ON_MINIMIZE_DELAY_MS);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698