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

Unified Diff: ui/events/event_dispatcher.cc

Issue 113283005: aura: Start using EventPrcessor interface for event dispatch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years 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/aura/window_targeter.cc ('k') | ui/events/event_processor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_dispatcher.cc
diff --git a/ui/events/event_dispatcher.cc b/ui/events/event_dispatcher.cc
index 1c11ef9fe5bd3063d0d55d63b4cc20ec9e543ae9..a1fbafa79c08f01c776fbcfb9a7ca10369db7ae5 100644
--- a/ui/events/event_dispatcher.cc
+++ b/ui/events/event_dispatcher.cc
@@ -46,8 +46,12 @@ Event* EventDispatcherDelegate::current_event() {
EventDispatchDetails EventDispatcherDelegate::DispatchEvent(EventTarget* target,
Event* event) {
CHECK(target);
+ Event::DispatcherApi dispatch_helper(event);
+ dispatch_helper.set_phase(EP_PREDISPATCH);
+ dispatch_helper.set_result(ER_UNHANDLED);
+
EventDispatchDetails details = PreDispatchEvent(target, event);
- if (!details.dispatcher_destroyed)
+ if (!event->handled() && !details.dispatcher_destroyed)
details = DispatchEventToTarget(target, event);
if (!details.dispatcher_destroyed)
details = PostDispatchEvent(target, *event);
« no previous file with comments | « ui/aura/window_targeter.cc ('k') | ui/events/event_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698