| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_ | 5 #ifndef ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_ |
| 6 #define ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_ | 6 #define ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_ |
| 7 | 7 |
| 8 #include "ash/wm/workspace/multi_window_resize_controller.h" | 8 #include "ash/wm/workspace/multi_window_resize_controller.h" |
| 9 #include "ui/events/event_handler.h" | 9 #include "ui/events/event_handler.h" |
| 10 | 10 |
| 11 namespace ash { | 11 namespace ash { |
| 12 class WorkspaceEventHandlerTestHelper; |
| 13 |
| 12 namespace wm { | 14 namespace wm { |
| 13 class WindowState; | 15 class WindowState; |
| 14 } | 16 } |
| 15 | 17 |
| 16 namespace internal { | |
| 17 | |
| 18 class WorkspaceEventHandlerTestHelper; | |
| 19 | |
| 20 class WorkspaceEventHandler : public ui::EventHandler { | 18 class WorkspaceEventHandler : public ui::EventHandler { |
| 21 public: | 19 public: |
| 22 WorkspaceEventHandler(); | 20 WorkspaceEventHandler(); |
| 23 virtual ~WorkspaceEventHandler(); | 21 virtual ~WorkspaceEventHandler(); |
| 24 | 22 |
| 25 // ui::EventHandler: | 23 // ui::EventHandler: |
| 26 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 24 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
| 27 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 25 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
| 28 | 26 |
| 29 private: | 27 private: |
| 30 friend class WorkspaceEventHandlerTestHelper; | 28 friend class WorkspaceEventHandlerTestHelper; |
| 31 | 29 |
| 32 // Determines if |event| corresponds to a double click on either the top or | 30 // Determines if |event| corresponds to a double click on either the top or |
| 33 // bottom vertical resize edge, and if so toggles the vertical height of the | 31 // bottom vertical resize edge, and if so toggles the vertical height of the |
| 34 // window between its restored state and the full available height of the | 32 // window between its restored state and the full available height of the |
| 35 // workspace. | 33 // workspace. |
| 36 void HandleVerticalResizeDoubleClick(wm::WindowState* window_state, | 34 void HandleVerticalResizeDoubleClick(wm::WindowState* window_state, |
| 37 ui::MouseEvent* event); | 35 ui::MouseEvent* event); |
| 38 | 36 |
| 39 MultiWindowResizeController multi_window_resize_controller_; | 37 MultiWindowResizeController multi_window_resize_controller_; |
| 40 | 38 |
| 41 DISALLOW_COPY_AND_ASSIGN(WorkspaceEventHandler); | 39 DISALLOW_COPY_AND_ASSIGN(WorkspaceEventHandler); |
| 42 }; | 40 }; |
| 43 | 41 |
| 44 } // namespace internal | |
| 45 } // namespace ash | 42 } // namespace ash |
| 46 | 43 |
| 47 #endif // ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_ | 44 #endif // ASH_WM_WORKSPACE_WORKSPACE_EVENT_HANDLER_H_ |
| OLD | NEW |