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

Unified Diff: ui/views/view_targeter_delegate.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_delegate.h
diff --git a/ui/views/view_targeter_delegate.h b/ui/views/view_targeter_delegate.h
index 134a8799ce9a04968a48f71ee36bb151d3f90365..01b6bd1e13cc17a6ee8492b0815b883cec3044ac 100644
--- a/ui/views/view_targeter_delegate.h
+++ b/ui/views/view_targeter_delegate.h
@@ -29,6 +29,16 @@ class VIEWS_EXPORT ViewTargeterDelegate {
virtual bool DoesIntersectRect(const View* target,
const gfx::Rect& rect) const;
+ // If point-based targeting should be used, return the deepest visible
+ // descendant of |root| that contains the center point of |rect|.
+ // If rect-based targeting (i.e., fuzzing) should be used, return the
+ // closest visible descendant of |root| having at least kRectTargetOverlap of
+ // its area covered by |rect|. If no such descendant exists, return the
+ // deepest visible descendant of |root| that contains the center point of
+ // |rect|. See http://goo.gl/3Jp2BD for more information about rect-based
+ // targeting.
+ virtual View* TargetForRect(View* root, const gfx::Rect& rect);
+
private:
DISALLOW_COPY_AND_ASSIGN(ViewTargeterDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698