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

Unified Diff: ui/base/events/event_handler.cc

Issue 11299285: events: Dispatch all events through EventHandler::OnEvent from the dispatcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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/base/events/event_handler.h ('k') | ui/ui.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/events/event_handler.cc
diff --git a/ui/base/events/event_handler.cc b/ui/base/events/event_handler.cc
index 93347a522c3f81da90d77e5d82d6f0cd11055e4a..ea9048e409de0e8e2b52f9cb550f574b774755be 100644
--- a/ui/base/events/event_handler.cc
+++ b/ui/base/events/event_handler.cc
@@ -4,6 +4,8 @@
#include "ui/base/events/event_handler.h"
+#include "ui/base/events/event.h"
+
namespace ui {
EventHandler::EventHandler() {
@@ -13,6 +15,16 @@ EventHandler::~EventHandler() {
}
EventResult EventHandler::OnEvent(Event* event) {
+ if (event->IsKeyEvent())
+ return OnKeyEvent(static_cast<KeyEvent*>(event));
+ if (event->IsMouseEvent())
+ return OnMouseEvent(static_cast<MouseEvent*>(event));
+ if (event->IsScrollEvent())
+ return OnScrollEvent(static_cast<ScrollEvent*>(event));
+ if (event->IsTouchEvent())
+ return OnTouchEvent(static_cast<TouchEvent*>(event));
+ if (event->IsGestureEvent())
+ return OnGestureEvent(static_cast<GestureEvent*>(event));
return ui::ER_UNHANDLED;
}
« no previous file with comments | « ui/base/events/event_handler.h ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698