OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 ASH_MUS_MOVE_EVENT_HANDLER_H_ | 5 #ifndef ASH_MUS_MOVE_EVENT_HANDLER_H_ |
6 #define ASH_MUS_MOVE_EVENT_HANDLER_H_ | 6 #define ASH_MUS_MOVE_EVENT_HANDLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "ash/common/wm/wm_toplevel_window_event_handler.h" | 10 #include "ash/common/wm/wm_toplevel_window_event_handler.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "ui/aura/window_observer.h" | 12 #include "ui/aura/window_observer.h" |
13 #include "ui/events/event_handler.h" | 13 #include "ui/events/event_handler.h" |
14 | 14 |
15 namespace aura { | 15 namespace aura { |
16 class Window; | 16 class Window; |
17 class WindowManagerClient; | 17 class WindowManagerClient; |
18 } | 18 } |
19 | 19 |
20 namespace ui { | 20 namespace ui { |
21 class CancelModeEvent; | 21 class CancelModeEvent; |
22 } | 22 } |
23 | 23 |
24 namespace ash { | 24 namespace ash { |
| 25 |
| 26 class WmWindowAura; |
| 27 |
25 namespace mus { | 28 namespace mus { |
26 | 29 |
27 class WmWindowMus; | |
28 class WorkspaceEventHandlerMus; | 30 class WorkspaceEventHandlerMus; |
29 | 31 |
30 // EventHandler attached to windows that may be dragged and/or resized. This | 32 // EventHandler attached to windows that may be dragged and/or resized. This |
31 // forwards to WmToplevelWindowEventHandler to handle the actual drag/resize. | 33 // forwards to WmToplevelWindowEventHandler to handle the actual drag/resize. |
32 // | 34 // |
33 // TODO(sky): rename this class to better reflect that it handles redirecting | 35 // TODO(sky): rename this class to better reflect that it handles redirecting |
34 // events in addition to drag. | 36 // events in addition to drag. |
35 class MoveEventHandler : public ui::EventHandler, public aura::WindowObserver { | 37 class MoveEventHandler : public ui::EventHandler, public aura::WindowObserver { |
36 public: | 38 public: |
37 MoveEventHandler(aura::WindowManagerClient* window_manager_client, | 39 MoveEventHandler(aura::WindowManagerClient* window_manager_client, |
(...skipping 28 matching lines...) Expand all Loading... |
66 WorkspaceEventHandlerMus* GetWorkspaceEventHandlerMus(); | 68 WorkspaceEventHandlerMus* GetWorkspaceEventHandlerMus(); |
67 | 69 |
68 // Overridden from ui::EventHandler: | 70 // Overridden from ui::EventHandler: |
69 void OnMouseEvent(ui::MouseEvent* event) override; | 71 void OnMouseEvent(ui::MouseEvent* event) override; |
70 void OnGestureEvent(ui::GestureEvent* event) override; | 72 void OnGestureEvent(ui::GestureEvent* event) override; |
71 void OnCancelMode(ui::CancelModeEvent* event) override; | 73 void OnCancelMode(ui::CancelModeEvent* event) override; |
72 | 74 |
73 // Overridden from aura::WindowObserver: | 75 // Overridden from aura::WindowObserver: |
74 void OnWindowDestroying(aura::Window* window) override; | 76 void OnWindowDestroying(aura::Window* window) override; |
75 | 77 |
76 WmWindowMus* wm_window_; | 78 ash::WmWindowAura* wm_window_; |
77 aura::WindowManagerClient* window_manager_client_; | 79 aura::WindowManagerClient* window_manager_client_; |
78 wm::WmToplevelWindowEventHandler toplevel_window_event_handler_; | 80 wm::WmToplevelWindowEventHandler toplevel_window_event_handler_; |
79 | 81 |
80 DISALLOW_COPY_AND_ASSIGN(MoveEventHandler); | 82 DISALLOW_COPY_AND_ASSIGN(MoveEventHandler); |
81 }; | 83 }; |
82 | 84 |
83 } // namespace mus | 85 } // namespace mus |
84 } // namespace ash | 86 } // namespace ash |
85 | 87 |
86 #endif // ASH_MUS_MOVE_EVENT_HANDLER_H_ | 88 #endif // ASH_MUS_MOVE_EVENT_HANDLER_H_ |
OLD | NEW |