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

Unified Diff: ui/events/event_processor.h

Issue 2681613002: Avoid two targeting phases in aura client-lib and EventProcessor. (Closed)
Patch Set: comments Created 3 years, 10 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/events/event_processor.h
diff --git a/ui/events/event_processor.h b/ui/events/event_processor.h
index 8e6305148ba5d5dca5d8f3a1bdb03a6ac5a06038..82d30ce1dfaedb18f1e4122717c284b5da79e383 100644
--- a/ui/events/event_processor.h
+++ b/ui/events/event_processor.h
@@ -10,14 +10,21 @@
namespace ui {
+class EventTargeter;
+
// EventProcessor receives an event from an EventSource and dispatches it to a
// tree of EventTargets.
class EVENTS_EXPORT EventProcessor : public EventDispatcherDelegate {
public:
~EventProcessor() override {}
- // Returns the root of the tree this event processor owns.
- virtual EventTarget* GetRootTarget() = 0;
+ // Returns the EventTarget with the right EventTargeter that we should use for
+ // dispatching this |event|.
+ virtual EventTarget* GetRootForEvent(Event* event) = 0;
+
+ // If the root target returned by GetRootForEvent() does not have a
+ // targeter set, then the default targeter is used to find the target.
+ virtual EventTargeter* GetDefaultEventTargeter() = 0;
// Dispatches an event received from the EventSource to the tree of
// EventTargets (whose root is returned by GetRootTarget()). The co-ordinate

Powered by Google App Engine
This is Rietveld 408576698