Chromium Code Reviews| Index: ui/views/view.h |
| diff --git a/ui/views/view.h b/ui/views/view.h |
| index d6158534bfde399184b68eb10278b4aba6af363e..7608d4c94e3836911ff747b29f269501626a595c 100644 |
| --- a/ui/views/view.h |
| +++ b/ui/views/view.h |
| @@ -108,6 +108,16 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, |
| public: |
| typedef std::vector<View*> Views; |
| + // 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 { |
|
Ben Goodger (Google)
2013/10/28 20:23:29
let's not add this to views. Instead we should del
tdanderson
2013/10/29 17:30:01
I moved this to ui/views/rect_based_targeting_util
|
| + HIT_TEST_SOURCE_MOUSE, |
| + HIT_TEST_SOURCE_TOUCH |
| + }; |
| + |
| struct ViewHierarchyChangedDetails { |
| ViewHierarchyChangedDetails() |
| : is_add(false), |
| @@ -1126,7 +1136,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(); |