Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(574)

Unified Diff: ui/views/view.h

Issue 32463003: Modify hit test masks for tabs and tab close buttons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip_unittest.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.h
diff --git a/ui/views/view.h b/ui/views/view.h
index d6158534bfde399184b68eb10278b4aba6af363e..1aa8d97702a532e8b9189f699ce60459f1f1d01e 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -108,6 +108,18 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public:
typedef std::vector<View*> Views;
+ // TODO(tdanderson,sadrul): Becomes obsolete with the refactoring of the
+ // event targeting logic for views and windows.
+ // Specifies the source of the region used in a hit test.
+ // HIT_TEST_SOURCE_MOUSE indicates the hit test is being performed with a
+ // single point and HIT_TEST_SOURCE_TOUCH indicates the hit test is being
+ // performed with a rect larger than a single point. This value can be used,
+ // for example, to add extra padding or change the shape of the hit test mask.
+ enum HitTestSource {
+ HIT_TEST_SOURCE_MOUSE,
+ HIT_TEST_SOURCE_TOUCH
+ };
+
struct ViewHierarchyChangedDetails {
ViewHierarchyChangedDetails()
: is_add(false),
@@ -1126,7 +1138,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Called by HitTestRect() to retrieve a mask for hit-testing against.
// Subclasses override to provide custom shaped hit test regions.
- virtual void GetHitTestMask(gfx::Path* mask) const;
+ virtual void GetHitTestMask(HitTestSource source, gfx::Path* mask) const;
virtual DragInfo* GetDragInfo();
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip_unittest.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698