summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs/tab.h
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-18 19:01:38 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-18 19:01:38 +0000
commit0a2b5f3f826e22e5530d05be5ac39e16feeade6b (patch)
tree05720111624900641d5123ec11e9b63f3d26a7e2 /chrome/browser/views/tabs/tab.h
parenta1e6ef9c66cee6449c2a85885c74c20c8b92be19 (diff)
downloadchromium_src-0a2b5f3f826e22e5530d05be5ac39e16feeade6b.zip
chromium_src-0a2b5f3f826e22e5530d05be5ac39e16feeade6b.tar.gz
chromium_src-0a2b5f3f826e22e5530d05be5ac39e16feeade6b.tar.bz2
Fixes browser crash that could occur if the user closed a tab with an
unload handler, then right clicked on the tab. The fix is to close the menu if the tab closes. BUG=4846 TEST=see bug Review URL: http://codereview.chromium.org/14843 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7235 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/tabs/tab.h')
-rw-r--r--chrome/browser/views/tabs/tab.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/views/tabs/tab.h b/chrome/browser/views/tabs/tab.h
index 5534e82..17134e1 100644
--- a/chrome/browser/views/tabs/tab.h
+++ b/chrome/browser/views/tabs/tab.h
@@ -84,6 +84,10 @@ class Tab : public TabRenderer,
virtual bool IsSelected() const;
private:
+ class ContextMenuController;
+
+ friend class ContextMenuController;
+
// views::View overrides:
virtual bool HasHitTestMask() const;
virtual void GetHitTestMask(gfx::Path* mask) const;
@@ -110,6 +114,9 @@ class Tab : public TabRenderer,
// representation. Used by GetViewForPoint for hit-testing.
void MakePathForTab(gfx::Path* path) const;
+ // Invoked when the context menu closes.
+ void ContextMenuClosed();
+
// An instance of a delegate object that can perform various actions based on
// user gestures.
TabDelegate* delegate_;
@@ -117,6 +124,9 @@ class Tab : public TabRenderer,
// True if the tab is being animated closed.
bool closing_;
+ // If non-null it means we're showing a menu for the tab.
+ ContextMenuController* menu_controller_;
+
DISALLOW_COPY_AND_ASSIGN(Tab);
};