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

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

Issue 1311913007: Do not select a Tab while closing all tabs or undoing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/tabmodel/TabModel.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModel.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModel.java
index 796e0333135f81d1cd412debc54563bbbd53a716..23c8dcdf6685056a6aff4465b849126f5ed220ec 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModel.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModel.java
@@ -67,9 +67,11 @@ public interface TabModel extends TabList {
* from this list. To get a comprehensive list of all tabs, including ones that
* have been partially closed, use the {@link TabList} from
* {@link #getComprehensiveModel()}.
+ * @param closingAll Whether this close is due to closing all or not.
* @return true if the tab was found
*/
- public boolean closeTab(Tab tab, boolean animate, boolean uponExit, boolean canUndo);
+ public boolean closeTab(
+ Tab tab, boolean animate, boolean uponExit, boolean canUndo, boolean closingAll);
/**
* Returns which tab would be selected if the specified tab {@code id} were closed.
@@ -113,8 +115,9 @@ public interface TabModel extends TabList {
* Cancels a pending {@link Tab} closure, bringing the tab back into this model. Note that this
* will select the rewound {@link Tab}.
* @param tabId The id of the {@link Tab} to undo.
+ * @param isHidden Whether the restored tab should be hidden or not.
*/
- public void cancelTabClosure(int tabId);
+ public void cancelTabClosure(int tabId, boolean isHidden);
/**
* @return The complete {@link TabList} this {@link TabModel} represents. Note that this may

Powered by Google App Engine
This is Rietveld 408576698