diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-21 16:58:39 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-21 16:58:39 +0000 |
commit | 0cce15f698f40ee35ab7ded987360ca6c7f44753 (patch) | |
tree | a39d3617327df3baa0cce9a49ecc4281a144cc1d /chrome/browser/tab_contents/tab_contents.h | |
parent | aef9284447e6e63d30448481e8cdf01ba1ecdf22 (diff) | |
download | chromium_src-0cce15f698f40ee35ab7ded987360ca6c7f44753.zip chromium_src-0cce15f698f40ee35ab7ded987360ca6c7f44753.tar.gz chromium_src-0cce15f698f40ee35ab7ded987360ca6c7f44753.tar.bz2 |
Adds ability to determine if a tab was explicitly closed by the
user. This will be used to determine if the tab should be restored on
startup or not.
BUG=4923
TEST=none
Review URL: http://codereview.chromium.org/2087012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47923 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/tab_contents.h')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h index c657d55..93c8c71 100644 --- a/chrome/browser/tab_contents/tab_contents.h +++ b/chrome/browser/tab_contents/tab_contents.h @@ -673,6 +673,15 @@ class TabContents : public PageNavigator, // The caller owns the returned object. TabContents* CloneAndMakePhantom(); + // Indicates if this tab was explicitly closed by the user (control-w, close + // tab menu item...). This is false for actions that indirectly close the tab, + // such as closing the window. The setter is maintained by TabStripModel, and + // the getter only useful from within TAB_CLOSED notification + void set_closed_by_user_gesture(bool value) { + closed_by_user_gesture_ = value; + } + bool closed_by_user_gesture() const { return closed_by_user_gesture_; } + // JavaScriptMessageBoxClient ------------------------------------------------ virtual std::wstring GetMessageBoxTitle(const GURL& frame_url, bool is_alert); @@ -1276,6 +1285,9 @@ class TabContents : public PageNavigator, // we don't do it more than once. bool requested_accessibility_tree_; + // See description above setter. + bool closed_by_user_gesture_; + // --------------------------------------------------------------------------- DISALLOW_COPY_AND_ASSIGN(TabContents); |