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

Unified Diff: ui/events/event_targeter.h

Issue 542323002: Convert ui::GestureEvent coordinates during targeting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years, 3 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
« no previous file with comments | « ui/events/event_processor_unittest.cc ('k') | ui/views/view_targeter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_targeter.h
diff --git a/ui/events/event_targeter.h b/ui/events/event_targeter.h
index dead49f1367a1923b2c5fa8eb9770c1374063057..23b12614b5e5b2aab1f14065764cb4f0e0f26022 100644
--- a/ui/events/event_targeter.h
+++ b/ui/events/event_targeter.h
@@ -20,7 +20,11 @@ class EVENTS_EXPORT EventTargeter {
virtual ~EventTargeter();
// Returns the target |event| should be dispatched to. If there is no such
- // target, this should return NULL.
+ // target, return NULL. If |event| is a located event, the location of |event|
+ // is in the coordinate space of |root|. Furthermore, the targeter can mutate
+ // the event (e.g., by changing the location of the event to be in the
+ // returned target's coordinate space) so that it can be dispatched to the
+ // target without any further modification.
virtual EventTarget* FindTargetForEvent(EventTarget* root,
Event* event);
@@ -28,7 +32,9 @@ class EVENTS_EXPORT EventTargeter {
// etc. of |event| are in |root|'s coordinate system. When finding the target
// for the event, the targeter can mutate the |event| (e.g. change the
// coordinate to be in the returned target's coordinate system) so that it can
- // be dispatched to the target without any farther modification.
+ // be dispatched to the target without any further modification.
+ // TODO(tdanderson|sadrul): This should not be in the public API of
+ // EventTargeter.
virtual EventTarget* FindTargetForLocatedEvent(EventTarget* root,
LocatedEvent* event);
@@ -43,6 +49,7 @@ class EVENTS_EXPORT EventTargeter {
const LocatedEvent& event);
// Returns the next best target for |event| as compared to |previous_target|.
+ // |event| is in the local coordinate space of |previous_target|.
// Also mutates |event| so that it can be dispatched to the returned target
// (e.g., by changing |event|'s location to be in the returned target's
// coordinate space).
« no previous file with comments | « ui/events/event_processor_unittest.cc ('k') | ui/views/view_targeter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698