summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tabs
diff options
context:
space:
mode:
authorojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-02 00:44:47 +0000
committerojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-02 00:44:47 +0000
commit04b4a6c37ac2250bc4e7230c24801d5cf9ffd8e7 (patch)
tree1e67976bfec449d5f6c4b209630491a4bfde3ffc /chrome/browser/tabs
parent9e43dae7106b6064ebc6580fe111568f1cbdd393 (diff)
downloadchromium_src-04b4a6c37ac2250bc4e7230c24801d5cf9ffd8e7.zip
chromium_src-04b4a6c37ac2250bc4e7230c24801d5cf9ffd8e7.tar.gz
chromium_src-04b4a6c37ac2250bc4e7230c24801d5cf9ffd8e7.tar.bz2
A bunch of cleanups to beforeunload/unload handling.
1. Remove all the is_closing_browser plumbing. WebContents/TabContents/RenderViewHost/etc really shouldn't (and don't!) need to know anything about whether we're closing the browser or not. 2. Refactor the handling of beforeunload/unload state in browser.cc. I think this makes it considerably easier to reason about the correctness of it. 3. Added a couple TODOs for future cleanups that would have made this change a bit too large. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs')
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index dbfc0d1..c2076f1 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -531,7 +531,7 @@ bool TabStripModel::InternalCloseTabContentsAt(int index,
WebContents* web_contents = GetContentsAt(index)->AsWebContents();
// If we hit this code path, the tab had better be a WebContents tab.
DCHECK(web_contents);
- web_contents->render_view_host()->AttemptToClosePage(false);
+ web_contents->render_view_host()->FirePageBeforeUnload();
return false;
}