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

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

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 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.h ('k') | ui/base/events/event_dispatcher.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_DISPATCHER_H_ 5 #ifndef UI_BASE_EVENTS_EVENT_DISPATCHER_H_
6 #define UI_BASE_EVENTS_EVENT_DISPATCHER_H_ 6 #define UI_BASE_EVENTS_EVENT_DISPATCHER_H_
7 7
8 #include "ui/base/events/event.h" 8 #include "ui/base/events/event.h"
9 #include "ui/base/events/event_constants.h" 9 #include "ui/base/events/event_constants.h"
10 #include "ui/base/events/event_target.h" 10 #include "ui/base/events/event_target.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 if (destroyed) { 108 if (destroyed) {
109 result |= ui::ER_CONSUMED; 109 result |= ui::ER_CONSUMED;
110 } else { 110 } else {
111 current_event_ = old_event; 111 current_event_ = old_event;
112 set_on_destroy_ = NULL; 112 set_on_destroy_ = NULL;
113 } 113 }
114 return result; 114 return result;
115 } 115 }
116 116
117 EventResult DispatchEventToSingleHandler(EventHandler* handler, Event* event); 117 EventResult DispatchEventToSingleHandler(EventHandler* handler, Event* event);
118 EventResult DispatchEventToSingleHandler(EventHandler* handler,
119 KeyEvent* event);
120 EventResult DispatchEventToSingleHandler(EventHandler* handler,
121 MouseEvent* event);
122 EventResult DispatchEventToSingleHandler(EventHandler* handler,
123 ScrollEvent* event);
124 EventResult DispatchEventToSingleHandler(EventHandler* handler,
125 TouchEvent* event);
126 EventResult DispatchEventToSingleHandler(EventHandler* handler,
127 GestureEvent* event);
128 118
129 // This is used to track whether the dispatcher has been destroyed in the 119 // This is used to track whether the dispatcher has been destroyed in the
130 // middle of dispatching an event. 120 // middle of dispatching an event.
131 bool* set_on_destroy_; 121 bool* set_on_destroy_;
132 122
133 Event* current_event_; 123 Event* current_event_;
134 124
135 DISALLOW_COPY_AND_ASSIGN(EventDispatcher); 125 DISALLOW_COPY_AND_ASSIGN(EventDispatcher);
136 }; 126 };
137 127
138 } // namespace ui 128 } // namespace ui
139 129
140 #endif // UI_BASE_EVENTS_EVENT_DISPATCHER_H_ 130 #endif // UI_BASE_EVENTS_EVENT_DISPATCHER_H_
OLDNEW
« no previous file with comments | « ui/base/events/event.h ('k') | ui/base/events/event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698