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

Unified Diff: ui/events/event_processor.cc

Issue 552503003: Introduce EventProcessor::OnEventProcessingStarted() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: OnEventProcessingStarted() marks the event as handled instead of returning false 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.h ('k') | ui/events/event_processor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_processor.cc
diff --git a/ui/events/event_processor.cc b/ui/events/event_processor.cc
index 25c8c3fae92ca2b74e723fce69ee2fe6792b6c49..0a7cc66c22023cff9c6acd4bd2486545366a7ec9 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,8 +25,9 @@ EventDispatchDetails EventProcessor::OnEventFromSource(Event* event) {
event_to_dispatch = event_copy.get();
}
- EventTarget* target = targeter->FindTargetForEvent(root, event_to_dispatch);
EventDispatchDetails details;
+ OnEventProcessingStarted(event);
sadrul 2014/09/15 19:05:46 event_to_dispatch?
tdanderson 2014/09/15 19:14:27 Done.
+ EventTarget* target = targeter->FindTargetForEvent(root, event_to_dispatch);
sadrul 2014/09/15 19:05:46 You need to check event_to_dispatch->handled() bef
tdanderson 2014/09/15 19:14:27 Ah yes, of course. Checked this in while(...).
while (target) {
details = DispatchEvent(target, event_to_dispatch);
@@ -51,7 +51,7 @@ EventDispatchDetails EventProcessor::OnEventFromSource(Event* event) {
return details;
}
-void EventProcessor::PrepareEventForDispatch(Event* event) {
+void EventProcessor::OnEventProcessingStarted(Event* event) {
}
void EventProcessor::OnEventProcessingFinished(Event* event) {
« no previous file with comments | « ui/events/event_processor.h ('k') | ui/events/event_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698