| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 Window* window() { return host()->window(); } | 58 Window* window() { return host()->window(); } |
| 59 const Window* window() const { return host()->window(); } | 59 const Window* window() const { return host()->window(); } |
| 60 WindowTreeHost* host() { | 60 WindowTreeHost* host() { |
| 61 return const_cast<WindowTreeHost*>( | 61 return const_cast<WindowTreeHost*>( |
| 62 const_cast<const WindowEventDispatcher*>(this)->host()); | 62 const_cast<const WindowEventDispatcher*>(this)->host()); |
| 63 } | 63 } |
| 64 const WindowTreeHost* host() const { return host_; } | 64 const WindowTreeHost* host() const { return host_; } |
| 65 Window* mouse_pressed_handler() { return mouse_pressed_handler_; } | 65 Window* mouse_pressed_handler() { return mouse_pressed_handler_; } |
| 66 Window* mouse_moved_handler() { return mouse_moved_handler_; } | 66 Window* mouse_moved_handler() { return mouse_moved_handler_; } |
| 67 | 67 |
| 68 // Stop listening events in preparation for shutdown. | |
| 69 void PrepareForShutdown(); | |
| 70 | |
| 71 // Repost event for re-processing. Used when exiting context menus. | 68 // Repost event for re-processing. Used when exiting context menus. |
| 72 // We only support the ET_MOUSE_PRESSED and ET_GESTURE_TAP_DOWN event | 69 // We only support the ET_MOUSE_PRESSED and ET_GESTURE_TAP_DOWN event |
| 73 // types (although the latter is currently a no-op). | 70 // types (although the latter is currently a no-op). |
| 74 void RepostEvent(const ui::LocatedEvent& event); | 71 void RepostEvent(const ui::LocatedEvent& event); |
| 75 | 72 |
| 76 // Invoked when the mouse events get enabled or disabled. | 73 // Invoked when the mouse events get enabled or disabled. |
| 77 void OnMouseEventsEnableStateChanged(bool enabled); | 74 void OnMouseEventsEnableStateChanged(bool enabled); |
| 78 | 75 |
| 79 void DispatchCancelModeEvent(); | 76 void DispatchCancelModeEvent(); |
| 80 | 77 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 255 |
| 259 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. | 256 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. |
| 260 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; | 257 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; |
| 261 | 258 |
| 262 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); | 259 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); |
| 263 }; | 260 }; |
| 264 | 261 |
| 265 } // namespace aura | 262 } // namespace aura |
| 266 | 263 |
| 267 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ | 264 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |
| OLD | NEW |