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

Unified Diff: chrome/browser/ui/unload_controller.cc

Issue 17382005: Unbreak tabs.onRemove extension API in face of fast tab closure Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't modify content Created 7 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
Index: chrome/browser/ui/unload_controller.cc
diff --git a/chrome/browser/ui/unload_controller.cc b/chrome/browser/ui/unload_controller.cc
index 19d61540a760ae4b3e23d49db68ebd3de73ce377..010b2877b9dd6be228ac7b75ec8ab001347cd15e 100644
--- a/chrome/browser/ui/unload_controller.cc
+++ b/chrome/browser/ui/unload_controller.cc
@@ -162,7 +162,8 @@ void UnloadController::TabInsertedAt(content::WebContents* contents,
}
void UnloadController::TabDetachedAt(content::WebContents* contents,
- int index) {
+ int index,
+ bool closing_all) {
TabDetachedImpl(contents);
}
@@ -221,9 +222,10 @@ bool UnloadController::DetachWebContents(content::WebContents* contents) {
if (index != TabStripModel::kNoTab &&
contents->NeedToFireBeforeUnload()) {
tabs_needing_unload_ack_.insert(contents);
+ CoreTabHelper* core_tab_helper = CoreTabHelper::FromWebContents(contents);
+ core_tab_helper->OnUnloadAboutToDetach();
browser_->tab_strip_model()->DetachWebContentsAt(index);
contents->SetDelegate(detached_delegate_.get());
- CoreTabHelper* core_tab_helper = CoreTabHelper::FromWebContents(contents);
core_tab_helper->OnUnloadDetachedStarted();
return true;
}

Powered by Google App Engine
This is Rietveld 408576698