Chromium Code Reviews| Index: ui/events/event_processor.cc |
| diff --git a/ui/events/event_processor.cc b/ui/events/event_processor.cc |
| index 25c8c3fae92ca2b74e723fce69ee2fe6792b6c49..b508508aa06394c1ca274745fe89aa4f08668058 100644 |
| --- a/ui/events/event_processor.cc |
| +++ b/ui/events/event_processor.cc |
| @@ -14,7 +14,6 @@ EventDispatchDetails EventProcessor::OnEventFromSource(Event* event) { |
| CHECK(root); |
| EventTargeter* targeter = root->GetEventTargeter(); |
| CHECK(targeter); |
| - PrepareEventForDispatch(event); |
| // If |event| is in the process of being dispatched or has already been |
| // dispatched, then dispatch a copy of the event instead. |
| @@ -26,7 +25,11 @@ EventDispatchDetails EventProcessor::OnEventFromSource(Event* event) { |
| event_to_dispatch = event_copy.get(); |
| } |
| - EventTarget* target = targeter->FindTargetForEvent(root, event_to_dispatch); |
| + OnEventProcessingStarted(event_to_dispatch); |
| + EventTarget* target = NULL; |
| + if (!event_to_dispatch->handled()) |
| + target = targeter->FindTargetForEvent(root, event_to_dispatch); |
|
tdanderson
2014/09/23 21:30:27
Another option would be to have EventTargeter::Fin
sadrul
2014/09/25 16:12:00
I think we should do this here, and not require al
tdanderson
2014/09/25 17:11:58
Sounds good, left as-is then.
|
| + |
| EventDispatchDetails details; |
| while (target) { |
| details = DispatchEvent(target, event_to_dispatch); |
| @@ -51,7 +54,7 @@ EventDispatchDetails EventProcessor::OnEventFromSource(Event* event) { |
| return details; |
| } |
| -void EventProcessor::PrepareEventForDispatch(Event* event) { |
| +void EventProcessor::OnEventProcessingStarted(Event* event) { |
| } |
| void EventProcessor::OnEventProcessingFinished(Event* event) { |