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

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

Issue 738693002: Opening new "about:blank" tab if all tabs are closed in tab switcher mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment changes Created 6 years, 1 month 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/shell/java/src/org/chromium/chrome/shell/TabManager.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/tabmodel/TabModelBase.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelBase.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelBase.java
index 58ae32709ce425e9e76c9f3f41d4c0390e2ecc03..cb03412cc243312f859f94e5cf4ba795a82a50db 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelBase.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelBase.java
@@ -453,6 +453,7 @@ public abstract class TabModelBase extends TabModelJniBridge {
}
mTabs.remove(tab);
+ for (TabModelObserver obs : mObservers) obs.didCloseTab(tab);
Bernhard Bauer 2014/11/19 09:57:34 Why this change? didCloseTab() means that closing
divya.bansal 2014/11/19 10:04:24 Here after tab is removed didclosetab is called.If
Bernhard Bauer 2014/11/19 10:06:45 Right, but you can't just go ahead and change the
divya.bansal 2014/11/19 10:09:39 willCloseTab() is set even before tab is removed i
Bernhard Bauer 2014/11/19 10:13:53 Would it work if you call createNewTab() if the co
divya.bansal 2014/11/19 12:07:57 Done.
boolean nextIsIncognito = nextTab == null ? false : nextTab.isIncognito();
int nextTabId = nextTab == null ? Tab.INVALID_TAB_ID : nextTab.getId();
@@ -477,7 +478,6 @@ public abstract class TabModelBase extends TabModelJniBridge {
* @param tab The {@link Tab} to close.
*/
private void finalizeTabClosure(Tab tab) {
- for (TabModelObserver obs : mObservers) obs.didCloseTab(tab);
tab.destroy();
}
« no previous file with comments | « no previous file | chrome/android/shell/java/src/org/chromium/chrome/shell/TabManager.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698