Chromium Code Reviews| Index: ui/views/view.h |
| diff --git a/ui/views/view.h b/ui/views/view.h |
| index 9482cefa86b0b5b57bc7dc12250bbc8602425846..0d73640931a4c7bf73fb78d48d26a68ea58cc4bf 100644 |
| --- a/ui/views/view.h |
| +++ b/ui/views/view.h |
| @@ -509,8 +509,12 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, |
| // the cursor is a shared resource. |
| virtual gfx::NativeCursor GetCursor(const MouseEvent& event); |
| - // Convenience to test whether a point is within this view's bounds |
| - virtual bool HitTest(const gfx::Point& l) const; |
| + // A convenience function which calls HitTestRect with a rect of size |
|
sky
2012/08/09 00:33:52
Use () when referring to methods, eg HitTestRect()
tdanderson
2012/08/09 16:16:46
Done.
|
| + // 1x1 and an origin of |point|. |
| + bool HitTestPoint(const gfx::Point& point) const; |
| + |
| + // Tests whether |rect| intersects this view's bounds. |
| + virtual bool HitTestRect(const gfx::Rect& rect) const; |
| // This method is invoked when the user clicks on this view. |
| // The provided event is in the receiver's coordinate system. |
| @@ -1028,14 +1032,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, |
| // Input --------------------------------------------------------------------- |
| - // Called by HitTest to see if this View has a custom hit test mask. If the |
| - // return value is true, GetHitTestMask will be called to obtain the mask. |
| - // Default value is false, in which case the View will hit-test against its |
| - // bounds. |
| + // Called by HitTestRect to see if this View has a custom hit test mask. If |
| + // the return value is true, GetHitTestMask will be called to obtain the |
| + // mask. Default value is false, in which case the View will hit-test against |
| + // its bounds. |
| virtual bool HasHitTestMask() const; |
| - // Called by HitTest to retrieve a mask for hit-testing against. Subclasses |
| - // override to provide custom shaped hit test regions. |
| + // 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; |
| // Focus --------------------------------------------------------------------- |