summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tabs/tab.h
diff options
context:
space:
mode:
authorbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-25 20:37:23 +0000
committerbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-25 20:37:23 +0000
commit050aa8004bdacfe680417f455b8723b693f92c66 (patch)
tree2498a52b71efcd2063887d4809d34f5b99fa4900 /chrome/browser/tabs/tab.h
parent4e676cc8c2c9de932162727b2e6a1a31ac176df9 (diff)
downloadchromium_src-050aa8004bdacfe680417f455b8723b693f92c66.zip
chromium_src-050aa8004bdacfe680417f455b8723b693f92c66.tar.gz
chromium_src-050aa8004bdacfe680417f455b8723b693f92c66.tar.bz2
Make tabs highlight and accept clicks based on the shape of the rendered tab, rather than the bounding box of the view that renders it. This allows for truer event handling.
B=656878 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1327 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs/tab.h')
-rw-r--r--chrome/browser/tabs/tab.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/tabs/tab.h b/chrome/browser/tabs/tab.h
index 802156b..10346ef 100644
--- a/chrome/browser/tabs/tab.h
+++ b/chrome/browser/tabs/tab.h
@@ -10,6 +10,7 @@
#include "chrome/views/base_button.h"
namespace gfx {
+class Path;
class Point;
}
class TabContents;
@@ -83,6 +84,8 @@ class Tab : public TabRenderer,
// TabRenderer overrides:
virtual bool IsSelected() const;
+ // ChromeViews::View overrides:
+ virtual bool HitTest(const CPoint &l) const;
private:
// ChromeViews::View overrides:
virtual bool OnMousePressed(const ChromeViews::MouseEvent& event);
@@ -104,6 +107,10 @@ class Tab : public TabRenderer,
// ChromeViews::BaseButton::ButtonListener overrides:
virtual void ButtonPressed(ChromeViews::BaseButton* sender);
+ // Creates a path that contains the clickable region of the tab's visual
+ // representation. Used by GetViewForPoint for hit-testing.
+ void MakePathForTab(gfx::Path* path) const;
+
// An instance of a delegate object that can perform various actions based on
// user gestures.
TabDelegate* delegate_;