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

Side by Side Diff: ui/base/events/event_handler.h

Issue 11414283: Revert 170641 because it broke mac-debug build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/events/event_dispatcher.cc ('k') | ui/base/events/event_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_EVENTS_EVENT_HANDLER_H_ 5 #ifndef UI_BASE_EVENTS_EVENT_HANDLER_H_
6 #define UI_BASE_EVENTS_EVENT_HANDLER_H_ 6 #define UI_BASE_EVENTS_EVENT_HANDLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ui/base/events/event_constants.h" 10 #include "ui/base/events/event_constants.h"
(...skipping 10 matching lines...) Expand all
21 21
22 class EventTarget; 22 class EventTarget;
23 23
24 // Dispatches events to appropriate targets. The default implementations return 24 // Dispatches events to appropriate targets. The default implementations return
25 // ER_UNHANDLED for all events. 25 // ER_UNHANDLED for all events.
26 class UI_EXPORT EventHandler { 26 class UI_EXPORT EventHandler {
27 public: 27 public:
28 EventHandler(); 28 EventHandler();
29 virtual ~EventHandler(); 29 virtual ~EventHandler();
30 30
31 // This is called for all events. The default implementation routes the event
32 // to one of the event-specific callbacks (OnKeyEvent, OnMouseEvent etc.). If
33 // this is overridden, then normally, the override should chain into the
34 // default implementation for un-handled events.
35 virtual EventResult OnEvent(Event* event); 31 virtual EventResult OnEvent(Event* event);
36 32
37 virtual EventResult OnKeyEvent(KeyEvent* event); 33 virtual EventResult OnKeyEvent(KeyEvent* event);
38 34
39 virtual EventResult OnMouseEvent(MouseEvent* event); 35 virtual EventResult OnMouseEvent(MouseEvent* event);
40 36
41 virtual EventResult OnScrollEvent(ScrollEvent* event); 37 virtual EventResult OnScrollEvent(ScrollEvent* event);
42 38
43 virtual EventResult OnTouchEvent(TouchEvent* event); 39 virtual EventResult OnTouchEvent(TouchEvent* event);
44 40
45 virtual EventResult OnGestureEvent(GestureEvent* event); 41 virtual EventResult OnGestureEvent(GestureEvent* event);
46 }; 42 };
47 43
48 typedef std::vector<EventHandler*> EventHandlerList; 44 typedef std::vector<EventHandler*> EventHandlerList;
49 45
50 } // namespace ui 46 } // namespace ui
51 47
52 #endif // UI_BASE_EVENTS_EVENT_HANDLER_H_ 48 #endif // UI_BASE_EVENTS_EVENT_HANDLER_H_
OLDNEW
« no previous file with comments | « ui/base/events/event_dispatcher.cc ('k') | ui/base/events/event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698