| Index: ui/views/view.h
|
| diff --git a/ui/views/view.h b/ui/views/view.h
|
| index 2d028ef289e32b96e6c48006160f5199f2ad9af8..407ceaa0281c1fe67858de9daeda8463a5d8804b 100644
|
| --- a/ui/views/view.h
|
| +++ b/ui/views/view.h
|
| @@ -410,6 +410,15 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
|
| const View* target,
|
| gfx::Point* point);
|
|
|
| + // Convert |rect| from the coordinate system of one View to another.
|
| + //
|
| + // |source| and |target| must be in the same widget, but doesn't need to be in
|
| + // the same view hierarchy.
|
| + // |source| can be NULL in which case it means the screen coordinate system.
|
| + static void ConvertRectToTarget(const View* source,
|
| + const View* target,
|
| + gfx::Rect* rect);
|
| +
|
| // Convert a point from a View's coordinate system to that of its Widget.
|
| static void ConvertPointToWidget(const View* src, gfx::Point* point);
|
|
|
| @@ -500,7 +509,23 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
|
| // view's coordinates, except for a RootView.
|
|
|
| // Returns the deepest visible descendant that contains the specified point.
|
| - virtual View* GetEventHandlerForPoint(const gfx::Point& point);
|
| + View* GetEventHandlerForPoint(const gfx::Point& point);
|
| +
|
| + // Returns the appropriate event handler for the given touch rect.
|
| + View* GetEventHandlerForRect(const gfx::Rect& rect);
|
| +
|
| + // Flags the event type, so that a single GetEvent routine can handle both.
|
| + enum EventType { EVENT_HANDLER_TYPE_MOUSE, EVENT_HANDLER_TYPE_TOUCH };
|
| +
|
| + // Returns the appropriate event handler for the given |rect|. Location will
|
| + // either be a rect (for a touch event) or a point (as a 1X1 rect) for a
|
| + // mouse event.
|
| + // Considers the bounding rectangles of all leaf descendant views that have
|
| + // at least views::kFuzzingOverlapPercentage of their area covered by
|
| + // |rect|. Among these rectangles, choose one that is closest to the center
|
| + // line of |rect| and return its corresponding View. If there are no such
|
| + // rectangles, NULL is returned.
|
| + virtual View* GetEventHandler(const gfx::Rect& rect, EventType type);
|
|
|
| // Return the cursor that should be used for this view or the default cursor.
|
| // The event location is in the receiver's coordinate system. The caller is
|
|
|