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

Unified Diff: ui/views/view.h

Issue 10790019: Add gesture target fuzzing to views (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: sadrul's comments about testing addressed Created 8 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.h
diff --git a/ui/views/view.h b/ui/views/view.h
index 9482cefa86b0b5b57bc7dc12250bbc8602425846..8726e1edb8cf0b8be3d4de9a702fe3f4c84b073d 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -502,6 +502,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Returns the deepest visible descendant that contains the specified point.
virtual View* GetEventHandlerForPoint(const gfx::Point& point);
sky 2012/08/02 15:52:08 Add a comment to this that if overriding GetEventH
tdanderson 2012/08/02 18:11:37 Done.
+ // Considers the bounding rectangles of all leaf descendant views that have
+ // at least views::kFuzzingOverlapPercentage of their area covered by
+ // |touch_rect|. Among these rectangles, choose one that is closest to the
sky 2012/08/02 15:52:08 touch_rect -> rect Why is the rect in screen coor
tdanderson 2012/08/02 18:11:37 Done.
+ // center line of |touch_rect| and return its corresponding View. If there
+ // are no such rectangles, NULL is returned. Note that |touch_rect| is in
+ // screen coordinates.
+ virtual View* GetEventHandlerForRect(const gfx::Rect& touch_rect);
+
// 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
// responsible for managing the lifetime of the returned object, though that

Powered by Google App Engine
This is Rietveld 408576698