summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tabs/tab_strip_model.h
diff options
context:
space:
mode:
authorbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-29 05:52:57 +0000
committerbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-29 05:52:57 +0000
commit06d31f0faf9bfb5dd23b5b54621781564fed710c (patch)
treeb1b7a993c2f1e60a059879a70559f05e7706ab96 /chrome/browser/tabs/tab_strip_model.h
parente4d0ff8452e962af5397fd58b96f4b8124c1e4c2 (diff)
downloadchromium_src-06d31f0faf9bfb5dd23b5b54621781564fed710c.zip
chromium_src-06d31f0faf9bfb5dd23b5b54621781564fed710c.tar.gz
chromium_src-06d31f0faf9bfb5dd23b5b54621781564fed710c.tar.bz2
Add a return value to InternalCloseTabContentsAt, indicating whether or not the TabContents was closed immediately or if we're waiting for an unload handler to fire.
Adjust indices in Close other tabs handler to take into account the fact that some tabs may not close immediately B=1295790 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs/tab_strip_model.h')
-rw-r--r--chrome/browser/tabs/tab_strip_model.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h
index aaa3edb..8a235c5 100644
--- a/chrome/browser/tabs/tab_strip_model.h
+++ b/chrome/browser/tabs/tab_strip_model.h
@@ -248,8 +248,10 @@ class TabStripModel : public NotificationObserver {
// Closes the TabContents at the specified index. This causes the TabContents
// to be destroyed, but it may not happen immediately (e.g. if it's a
// WebContents).
- void CloseTabContentsAt(int index) {
- InternalCloseTabContentsAt(index, true);
+ // Returns true if the TabContents was closed immediately, false if we are
+ // waiting for a response from an onunload handler.
+ bool CloseTabContentsAt(int index) {
+ return InternalCloseTabContentsAt(index, true);
}
// Replaces the entire state of a the tab at index by switching in a
@@ -426,7 +428,10 @@ class TabStripModel : public NotificationObserver {
// The boolean parameter create_historical_tab controls whether to
// record this tab and its history for reopening recently closed
// tabs.
- void InternalCloseTabContentsAt(int index, bool create_historical_tab);
+ //
+ // Returns true if the TabContents was closed immediately, false if we are
+ // waiting for the result of an onunload handler.
+ bool InternalCloseTabContentsAt(int index, bool create_historical_tab);
TabContents* GetContentsAt(int index) const;