Chromium Code Reviews| 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 <set> | |
| 8 #include <vector> | 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 11 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 15 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
| 16 #include "base/scoped_observer.h" | 17 #include "base/scoped_observer.h" |
| 17 #include "ui/aura/aura_export.h" | 18 #include "ui/aura/aura_export.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 232 // the mouse cursor. | 233 // the mouse cursor. |
| 233 void SynthesizeMouseMoveAfterChangeToWindow(Window* window); | 234 void SynthesizeMouseMoveAfterChangeToWindow(Window* window); |
| 234 | 235 |
| 235 void PreDispatchLocatedEvent(Window* target, ui::LocatedEvent* event); | 236 void PreDispatchLocatedEvent(Window* target, ui::LocatedEvent* event); |
| 236 void PreDispatchMouseEvent(Window* target, ui::MouseEvent* event); | 237 void PreDispatchMouseEvent(Window* target, ui::MouseEvent* event); |
| 237 void PreDispatchTouchEvent(Window* target, ui::TouchEvent* event); | 238 void PreDispatchTouchEvent(Window* target, ui::TouchEvent* event); |
| 238 | 239 |
| 239 WindowTreeHost* host_; | 240 WindowTreeHost* host_; |
| 240 | 241 |
| 241 // Touch ids that are currently down. | 242 // Touch ids that are currently down. |
| 242 uint32 touch_ids_down_; | 243 std::set<int> touch_ids_down_; |
|
spang
2015/04/13 17:19:54
std::bitset?
| |
| 243 | 244 |
| 244 Window* mouse_pressed_handler_; | 245 Window* mouse_pressed_handler_; |
| 245 Window* mouse_moved_handler_; | 246 Window* mouse_moved_handler_; |
| 246 Window* event_dispatch_target_; | 247 Window* event_dispatch_target_; |
| 247 Window* old_dispatch_target_; | 248 Window* old_dispatch_target_; |
| 248 | 249 |
| 249 bool synthesize_mouse_move_; | 250 bool synthesize_mouse_move_; |
| 250 | 251 |
| 251 // How many move holds are outstanding. We try to defer dispatching | 252 // How many move holds are outstanding. We try to defer dispatching |
| 252 // touch/mouse moves while the count is > 0. | 253 // touch/mouse moves while the count is > 0. |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 267 | 268 |
| 268 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. | 269 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. |
| 269 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; | 270 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; |
| 270 | 271 |
| 271 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); | 272 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); |
| 272 }; | 273 }; |
| 273 | 274 |
| 274 } // namespace aura | 275 } // namespace aura |
| 275 | 276 |
| 276 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ | 277 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |
| OLD | NEW |