OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_AURA_WINDOW_EVENT_DISPATCHER_H_ | 5 #ifndef UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |
6 #define UI_AURA_WINDOW_EVENT_DISPATCHER_H_ | 6 #define UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 // types (although the latter is currently a no-op). | 67 // types (although the latter is currently a no-op). |
68 void RepostEvent(const ui::LocatedEvent& event); | 68 void RepostEvent(const ui::LocatedEvent& event); |
69 | 69 |
70 // Invoked when the mouse events get enabled or disabled. | 70 // Invoked when the mouse events get enabled or disabled. |
71 void OnMouseEventsEnableStateChanged(bool enabled); | 71 void OnMouseEventsEnableStateChanged(bool enabled); |
72 | 72 |
73 void DispatchCancelModeEvent(); | 73 void DispatchCancelModeEvent(); |
74 | 74 |
75 // Handles a gesture event. Returns true if handled. Unlike the other | 75 // Handles a gesture event. Returns true if handled. Unlike the other |
76 // event-dispatching function (e.g. for touch/mouse/keyboard events), gesture | 76 // event-dispatching function (e.g. for touch/mouse/keyboard events), gesture |
77 // events are dispatched from GestureRecognizer instead of WindowTreeHost. | 77 // events are dispatched from GestureRecognizer instead of WindowTreeHost. |
sadrul
2014/05/07 13:42:17
This comment is wrong. Remove.
tdresser
2014/05/07 14:04:17
Done.
| |
78 void DispatchGestureEvent(ui::GestureEvent* event); | 78 virtual void DispatchGestureEvent(ui::GestureEvent* event) OVERRIDE; |
sadrul
2014/05/07 13:42:17
Move this down in line ~187
tdresser
2014/05/07 14:04:17
Done.
| |
79 | 79 |
80 // Dispatches a ui::ET_MOUSE_EXITED event at |point|. | 80 // Dispatches a ui::ET_MOUSE_EXITED event at |point|. |
81 // TODO(beng): needed only for WTH::OnCursorVisibilityChanged(). | 81 // TODO(beng): needed only for WTH::OnCursorVisibilityChanged(). |
82 void DispatchMouseExitAtPoint(const gfx::Point& point); | 82 void DispatchMouseExitAtPoint(const gfx::Point& point); |
83 | 83 |
84 // Gesture Recognition ------------------------------------------------------- | 84 // Gesture Recognition ------------------------------------------------------- |
85 | 85 |
86 // When a touch event is dispatched to a Window, it may want to process the | 86 // When a touch event is dispatched to a Window, it may want to process the |
87 // touch event asynchronously. In such cases, the window should consume the | 87 // touch event asynchronously. In such cases, the window should consume the |
88 // event during the event dispatch. Once the event is properly processed, the | 88 // event during the event dispatch. Once the event is properly processed, the |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
177 | 177 |
178 // Overridden from ui::EventDispatcherDelegate. | 178 // Overridden from ui::EventDispatcherDelegate. |
179 virtual bool CanDispatchToTarget(ui::EventTarget* target) OVERRIDE; | 179 virtual bool CanDispatchToTarget(ui::EventTarget* target) OVERRIDE; |
180 virtual ui::EventDispatchDetails PreDispatchEvent(ui::EventTarget* target, | 180 virtual ui::EventDispatchDetails PreDispatchEvent(ui::EventTarget* target, |
181 ui::Event* event) OVERRIDE; | 181 ui::Event* event) OVERRIDE; |
182 virtual ui::EventDispatchDetails PostDispatchEvent( | 182 virtual ui::EventDispatchDetails PostDispatchEvent( |
183 ui::EventTarget* target, const ui::Event& event) OVERRIDE; | 183 ui::EventTarget* target, const ui::Event& event) OVERRIDE; |
184 | 184 |
185 // Overridden from ui::GestureEventHelper. | 185 // Overridden from ui::GestureEventHelper. |
186 virtual bool CanDispatchToConsumer(ui::GestureConsumer* consumer) OVERRIDE; | 186 virtual bool CanDispatchToConsumer(ui::GestureConsumer* consumer) OVERRIDE; |
187 virtual void DispatchPostponedGestureEvent(ui::GestureEvent* event) OVERRIDE; | |
188 virtual void DispatchCancelTouchEvent(ui::TouchEvent* event) OVERRIDE; | 187 virtual void DispatchCancelTouchEvent(ui::TouchEvent* event) OVERRIDE; |
189 | 188 |
190 // Overridden from WindowObserver: | 189 // Overridden from WindowObserver: |
191 virtual void OnWindowDestroying(Window* window) OVERRIDE; | 190 virtual void OnWindowDestroying(Window* window) OVERRIDE; |
192 virtual void OnWindowDestroyed(Window* window) OVERRIDE; | 191 virtual void OnWindowDestroyed(Window* window) OVERRIDE; |
193 virtual void OnWindowAddedToRootWindow(Window* window) OVERRIDE; | 192 virtual void OnWindowAddedToRootWindow(Window* window) OVERRIDE; |
194 virtual void OnWindowRemovingFromRootWindow(Window* window, | 193 virtual void OnWindowRemovingFromRootWindow(Window* window, |
195 Window* new_root) OVERRIDE; | 194 Window* new_root) OVERRIDE; |
196 virtual void OnWindowVisibilityChanging(Window* window, | 195 virtual void OnWindowVisibilityChanging(Window* window, |
197 bool visible) OVERRIDE; | 196 bool visible) OVERRIDE; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
261 | 260 |
262 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. | 261 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. |
263 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; | 262 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; |
264 | 263 |
265 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); | 264 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); |
266 }; | 265 }; |
267 | 266 |
268 } // namespace aura | 267 } // namespace aura |
269 | 268 |
270 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ | 269 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |
OLD | NEW |