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

Unified Diff: chrome/browser/ui/tabs/tab_strip_model.cc

Issue 11016023: Quickly close tabs/window with long-running unload handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep original TabsNeedBeforeUnloadFired implementation. Created 8 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
Index: chrome/browser/ui/tabs/tab_strip_model.cc
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc
index 4a82399c2cf8db87990d8de2c8d351c3cd1bf701..2a9e6b68bf6d65105089cb99ce94d0c477b716a2 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -279,6 +279,13 @@ TabContents* TabStripModel::DetachTabContentsAt(int index) {
return removed_contents;
}
+TabContents* TabStripModel::DetachTabContentsAndCreateHistoryAt(int index) {
+ TabContents* contents = DetachTabContentsAt(index);
+ if (contents)
+ delegate_->CreateHistoricalTab(contents->web_contents());
+ return contents;
+}
+
void TabStripModel::ActivateTabAt(int index, bool user_gesture) {
DCHECK(ContainsIndex(index));
TabStripSelectionModel new_model;

Powered by Google App Engine
This is Rietveld 408576698