| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 // resizes when HoldMouseMoves() is called. The following methods are used to | 209 // resizes when HoldMouseMoves() is called. The following methods are used to |
| 210 // dispatch held and newly incoming mouse and touch events, typically when an | 210 // dispatch held and newly incoming mouse and touch events, typically when an |
| 211 // event other than one of these needs dispatching or a matching | 211 // event other than one of these needs dispatching or a matching |
| 212 // ReleaseMouseMoves()/ReleaseTouchMoves() is called. NOTE: because these | 212 // ReleaseMouseMoves()/ReleaseTouchMoves() is called. NOTE: because these |
| 213 // methods dispatch events from WindowTreeHost the coordinates are in terms of | 213 // methods dispatch events from WindowTreeHost the coordinates are in terms of |
| 214 // the root. | 214 // the root. |
| 215 ui::EventDispatchDetails DispatchHeldEvents() WARN_UNUSED_RESULT; | 215 ui::EventDispatchDetails DispatchHeldEvents() WARN_UNUSED_RESULT; |
| 216 | 216 |
| 217 // Posts a task to send synthesized mouse move event if there is no a pending | 217 // Posts a task to send synthesized mouse move event if there is no a pending |
| 218 // task. | 218 // task. |
| 219 void PostSynthesizeMouseMove(); | 219 void PostSynthesizeMouseMove(int mouse_button_flags); |
| 220 | 220 |
| 221 // Creates and dispatches synthesized mouse move event using the | 221 // Creates and dispatches synthesized mouse move event using the |
| 222 // current mouse location. | 222 // current mouse location. |
| 223 ui::EventDispatchDetails SynthesizeMouseMoveEvent() WARN_UNUSED_RESULT; | 223 ui::EventDispatchDetails SynthesizeMouseMoveEvent(int mouse_button_flags) |
| 224 WARN_UNUSED_RESULT; |
| 224 | 225 |
| 225 // Calls SynthesizeMouseMove() if |window| is currently visible and contains | 226 // Calls SynthesizeMouseMove() if |window| is currently visible and contains |
| 226 // the mouse cursor. | 227 // the mouse cursor. |
| 227 void SynthesizeMouseMoveAfterChangeToWindow(Window* window); | 228 void SynthesizeMouseMoveAfterChangeToWindow(Window* window); |
| 228 | 229 |
| 229 void PreDispatchLocatedEvent(Window* target, ui::LocatedEvent* event); | 230 void PreDispatchLocatedEvent(Window* target, ui::LocatedEvent* event); |
| 230 void PreDispatchMouseEvent(Window* target, ui::MouseEvent* event); | 231 void PreDispatchMouseEvent(Window* target, ui::MouseEvent* event); |
| 231 void PreDispatchTouchEvent(Window* target, ui::TouchEvent* event); | 232 void PreDispatchTouchEvent(Window* target, ui::TouchEvent* event); |
| 232 | 233 |
| 233 WindowTreeHost* host_; | 234 WindowTreeHost* host_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 261 | 262 |
| 262 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. | 263 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. |
| 263 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; | 264 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; |
| 264 | 265 |
| 265 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); | 266 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); |
| 266 }; | 267 }; |
| 267 | 268 |
| 268 } // namespace aura | 269 } // namespace aura |
| 269 | 270 |
| 270 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ | 271 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |
| OLD | NEW |