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

Unified Diff: ui/views/view_targeter.h

Issue 401933002: Move views event targeting into ViewTargeterDelegate::TargetForRect() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months 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
Index: ui/views/view_targeter.h
diff --git a/ui/views/view_targeter.h b/ui/views/view_targeter.h
index 9aa585b401214c1f3c1594f1bc23fb94c9132d11..52e7a0e0ddd077568c94cac337ac8bb55230048c 100644
--- a/ui/views/view_targeter.h
+++ b/ui/views/view_targeter.h
@@ -18,6 +18,8 @@ class ViewTargeterDelegate;
// derived classes) is installed on a View to specify the
// targeting behaviour to be used for the subtree rooted at
// that View.
+// TODO(tdanderson): Remove overrides of all EventHandler methods except for
+// FindTargetForEvent() and FindNextBestTarget().
class VIEWS_EXPORT ViewTargeter : public ui::EventTargeter {
public:
explicit ViewTargeter(ViewTargeterDelegate* delegate);
@@ -26,6 +28,9 @@ class VIEWS_EXPORT ViewTargeter : public ui::EventTargeter {
// A call-through to DoesIntersectRect() on |delegate_|.
bool DoesIntersectRect(const View* target, const gfx::Rect& rect) const;
+ // A call-through to TargetForRect() on |delegate_|.
+ View* TargetForRect(View* root, const gfx::Rect& rect) const;
+
protected:
// Returns the location of |event| represented as a rect. If |event| is
// a gesture event, its bounding box is returned. Otherwise, a 1x1 rect

Powered by Google App Engine
This is Rietveld 408576698