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

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

Issue 11308322: events: Start changing EventHandler interface to not return a value. (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_unittest.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 14 matching lines...) Expand all
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 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 32 // to one of the event-specific callbacks (OnKeyEvent, OnMouseEvent etc.). If
33 // this is overridden, then normally, the override should chain into the 33 // this is overridden, then normally, the override should chain into the
34 // default implementation for un-handled events. 34 // default implementation for un-handled events.
35 virtual EventResult OnEvent(Event* event); 35 virtual void OnEvent(Event* event);
36 36
37 virtual EventResult OnKeyEvent(KeyEvent* event); 37 virtual EventResult OnKeyEvent(KeyEvent* event);
38 38
39 virtual EventResult OnMouseEvent(MouseEvent* event); 39 virtual EventResult OnMouseEvent(MouseEvent* event);
40 40
41 virtual EventResult OnScrollEvent(ScrollEvent* event); 41 virtual EventResult OnScrollEvent(ScrollEvent* event);
42 42
43 virtual EventResult OnTouchEvent(TouchEvent* event); 43 virtual EventResult OnTouchEvent(TouchEvent* event);
44 44
45 virtual EventResult OnGestureEvent(GestureEvent* event); 45 virtual EventResult OnGestureEvent(GestureEvent* event);
46 }; 46 };
47 47
48 typedef std::vector<EventHandler*> EventHandlerList; 48 typedef std::vector<EventHandler*> EventHandlerList;
49 49
50 } // namespace ui 50 } // namespace ui
51 51
52 #endif // UI_BASE_EVENTS_EVENT_HANDLER_H_ 52 #endif // UI_BASE_EVENTS_EVENT_HANDLER_H_
OLDNEW
« no previous file with comments | « ui/base/events/event_dispatcher_unittest.cc ('k') | ui/base/events/event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698