| 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 <memory> |    8 #include <memory> | 
|    9 #include <vector> |    9 #include <vector> | 
|   10  |   10  | 
|   11 #include "base/gtest_prod_util.h" |   11 #include "base/gtest_prod_util.h" | 
|   12 #include "base/macros.h" |   12 #include "base/macros.h" | 
|   13 #include "base/memory/ref_counted.h" |   13 #include "base/memory/ref_counted.h" | 
|   14 #include "base/memory/weak_ptr.h" |   14 #include "base/memory/weak_ptr.h" | 
|   15 #include "base/message_loop/message_loop.h" |   15 #include "base/message_loop/message_loop.h" | 
|   16 #include "base/scoped_observer.h" |   16 #include "base/scoped_observer.h" | 
|   17 #include "ui/aura/aura_export.h" |   17 #include "ui/aura/aura_export.h" | 
|   18 #include "ui/aura/client/capture_delegate.h" |   18 #include "ui/aura/client/capture_delegate.h" | 
|   19 #include "ui/aura/env_observer.h" |   19 #include "ui/aura/env_observer.h" | 
|   20 #include "ui/aura/window_observer.h" |   20 #include "ui/aura/window_observer.h" | 
|   21 #include "ui/base/cursor/cursor.h" |   21 #include "ui/base/cursor/cursor.h" | 
|   22 #include "ui/events/event_constants.h" |   22 #include "ui/events/event_constants.h" | 
|   23 #include "ui/events/event_processor.h" |   23 #include "ui/events/event_processor.h" | 
|   24 #include "ui/events/event_targeter.h" |   24 #include "ui/events/event_targeter.h" | 
 |   25 #include "ui/events/fraction_of_time_without_user_input_recorder.h" | 
|   25 #include "ui/events/gestures/gesture_recognizer.h" |   26 #include "ui/events/gestures/gesture_recognizer.h" | 
|   26 #include "ui/events/gestures/gesture_types.h" |   27 #include "ui/events/gestures/gesture_types.h" | 
|   27 #include "ui/gfx/geometry/point.h" |   28 #include "ui/gfx/geometry/point.h" | 
|   28 #include "ui/gfx/native_widget_types.h" |   29 #include "ui/gfx/native_widget_types.h" | 
|   29  |   30  | 
|   30 namespace ui { |   31 namespace ui { | 
|   31 class GestureEvent; |   32 class GestureEvent; | 
|   32 class GestureRecognizer; |   33 class GestureRecognizer; | 
|   33 class MouseEvent; |   34 class MouseEvent; | 
|   34 class TouchEvent; |   35 class TouchEvent; | 
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  239   ui::EventDispatchDetails PreDispatchTouchEvent(Window* target, |  240   ui::EventDispatchDetails PreDispatchTouchEvent(Window* target, | 
|  240                                                  ui::TouchEvent* event); |  241                                                  ui::TouchEvent* event); | 
|  241  |  242  | 
|  242   WindowTreeHost* host_; |  243   WindowTreeHost* host_; | 
|  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  | 
 |  250   ui::FractionOfTimeWithoutUserInputRecorder | 
 |  251       fraction_of_time_without_user_input_recorder_; | 
 |  252  | 
|  249   bool synthesize_mouse_move_; |  253   bool synthesize_mouse_move_; | 
|  250  |  254  | 
|  251   // How many move holds are outstanding. We try to defer dispatching |  255   // How many move holds are outstanding. We try to defer dispatching | 
|  252   // touch/mouse moves while the count is > 0. |  256   // touch/mouse moves while the count is > 0. | 
|  253   int move_hold_count_; |  257   int move_hold_count_; | 
|  254   // The location of |held_move_event_| is in |window_|'s coordinate. |  258   // The location of |held_move_event_| is in |window_|'s coordinate. | 
|  255   std::unique_ptr<ui::LocatedEvent> held_move_event_; |  259   std::unique_ptr<ui::LocatedEvent> held_move_event_; | 
|  256  |  260  | 
|  257   // Allowing for reposting of events. Used when exiting context menus. |  261   // Allowing for reposting of events. Used when exiting context menus. | 
|  258   std::unique_ptr<ui::LocatedEvent> held_repostable_event_; |  262   std::unique_ptr<ui::LocatedEvent> held_repostable_event_; | 
| (...skipping 15 matching lines...) Expand all  Loading... | 
|  274  |  278  | 
|  275   // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. |  279   // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. | 
|  276   base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; |  280   base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; | 
|  277  |  281  | 
|  278   DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); |  282   DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); | 
|  279 }; |  283 }; | 
|  280  |  284  | 
|  281 }  // namespace aura |  285 }  // namespace aura | 
|  282  |  286  | 
|  283 #endif  // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |  287 #endif  // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ | 
| OLD | NEW |