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

Unified Diff: trunk/src/chrome/browser/ui/gtk/browser_window_gtk.cc

Issue 14362028: Speculative Revert 195108 "Changes to closing contents with beforeunload/unl..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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: trunk/src/chrome/browser/ui/gtk/browser_window_gtk.cc
===================================================================
--- trunk/src/chrome/browser/ui/gtk/browser_window_gtk.cc (revision 195133)
+++ trunk/src/chrome/browser/ui/gtk/browser_window_gtk.cc (working copy)
@@ -1431,16 +1431,12 @@
return false;
if (!browser_->tab_strip_model()->empty()) {
+ // Tab strip isn't empty. Hide the window (so it appears to have closed
+ // immediately) and close all the tabs, allowing the renderers to shut
+ // down. When the tab strip is empty we'll be called back again.
gtk_widget_hide(GTK_WIDGET(window_));
browser_->OnWindowClosing();
- browser_->tab_strip_model()->CloseAllTabs();
return false;
- } else if (!browser_->HasCompletedUnloadProcessing()) {
- // The browser needs to finish running unload handlers.
- // Hide the window (so it appears to have closed immediately), and
- // the browser will call us back again when it is ready to close.
- gtk_widget_hide(GTK_WIDGET(window_));
- return false;
}
// Empty TabStripModel, it's now safe to allow the Window to be closed.
« no previous file with comments | « trunk/src/chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | trunk/src/chrome/browser/ui/unload_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698