Changes to closing contents with beforeunload/unload handlers:
commitdf9416c847ceefdb4d1749cfd53866775f9a6535
authorslamm@chromium.org <slamm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 19 Apr 2013 08:48:40 +0000 (19 08:48 +0000)
committerslamm@chromium.org <slamm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 19 Apr 2013 08:48:40 +0000 (19 08:48 +0000)
treeca00a5b9680071517bdfabc1761e249ace2f1ad2
parent9fbab28719663d096e5102c8e6cfeabc3706e764
Changes to closing contents with beforeunload/unload handlers:
- Closing a single tab, run beforeunload (if needed), then detached the tab from
   tab strip and close it asynchronously (no ui).
- Closing a window, run all beforeunload handlers (same as before), then detach all tabs with unload handlers. Close any remaining tabs and hide the browser window while waiting for the unload handlers to complete.

This CL started with fast-tab-closure and has grown to include fast-window-closure too.

BUG=142458,156896

Review URL: https://chromiumcodereview.appspot.com/11016023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195108 0039d316-1c4b-4281-b951-d872f2087c98
14 files changed:
chrome/browser/ui/browser.cc
chrome/browser/ui/browser.h
chrome/browser/ui/cocoa/browser_window_controller.mm
chrome/browser/ui/gtk/browser_window_gtk.cc
chrome/browser/ui/unload_controller.cc
chrome/browser/ui/unload_controller.h
chrome/browser/ui/views/frame/browser_view.cc
chrome/browser/unload_browsertest.cc
chrome/test/data/fast_tab_close/no_listeners.html [new file with mode: 0644]
chrome/test/data/fast_tab_close/unload_sets_cookie.html [new file with mode: 0644]
chrome/test/data/fast_tab_close/unload_sleep_before_cookie.html [new file with mode: 0644]
content/browser/web_contents/web_contents_impl.cc
content/browser/web_contents/web_contents_impl.h
content/public/browser/web_contents.h