| 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_CONTROLLER_H_ | 5 #ifndef ASH_WM_WORKSPACE_CONTROLLER_H_ |
| 6 #define ASH_WM_WORKSPACE_CONTROLLER_H_ | 6 #define ASH_WM_WORKSPACE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 11 #include "ash/common/wm/workspace/workspace_types.h" | 11 #include "ash/common/wm/workspace/workspace_types.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 | 13 |
| 14 namespace aura { | |
| 15 class Window; | |
| 16 } | |
| 17 | |
| 18 namespace ash { | 14 namespace ash { |
| 19 class ShelfLayoutManager; | 15 class WmWindow; |
| 20 class WorkspaceControllerTestHelper; | 16 class WorkspaceControllerTestHelper; |
| 21 class WorkspaceEventHandler; | 17 class WorkspaceEventHandler; |
| 22 class WorkspaceLayoutManager; | 18 class WorkspaceLayoutManager; |
| 23 class WorkspaceLayoutManagerBackdropDelegate; | 19 class WorkspaceLayoutManagerBackdropDelegate; |
| 24 | 20 |
| 25 // WorkspaceController acts as a central place that ties together all the | 21 // WorkspaceController acts as a central place that ties together all the |
| 26 // various workspace pieces. | 22 // various workspace pieces. |
| 27 class ASH_EXPORT WorkspaceController { | 23 class ASH_EXPORT WorkspaceController { |
| 28 public: | 24 public: |
| 29 explicit WorkspaceController(aura::Window* viewport); | 25 explicit WorkspaceController(WmWindow* viewport); |
| 30 virtual ~WorkspaceController(); | 26 virtual ~WorkspaceController(); |
| 31 | 27 |
| 32 // Returns the current window state. | 28 // Returns the current window state. |
| 33 wm::WorkspaceWindowState GetWindowState() const; | 29 wm::WorkspaceWindowState GetWindowState() const; |
| 34 | 30 |
| 35 void SetShelf(ShelfLayoutManager* shelf); | |
| 36 | |
| 37 // Starts the animation that occurs on first login. | 31 // Starts the animation that occurs on first login. |
| 38 void DoInitialAnimation(); | 32 void DoInitialAnimation(); |
| 39 | 33 |
| 40 // Add a delegate which adds a backdrop behind the top window of the default | 34 // Add a delegate which adds a backdrop behind the top window of the default |
| 41 // workspace. | 35 // workspace. |
| 42 void SetMaximizeBackdropDelegate( | 36 void SetMaximizeBackdropDelegate( |
| 43 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> delegate); | 37 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> delegate); |
| 44 | 38 |
| 45 WorkspaceLayoutManager* layout_manager() { return layout_manager_; } | 39 WorkspaceLayoutManager* layout_manager() { return layout_manager_; } |
| 46 | 40 |
| 47 private: | 41 private: |
| 48 friend class WorkspaceControllerTestHelper; | 42 friend class WorkspaceControllerTestHelper; |
| 49 | 43 |
| 50 aura::Window* viewport_; | 44 WmWindow* viewport_; |
| 51 | |
| 52 ShelfLayoutManager* shelf_; | |
| 53 std::unique_ptr<WorkspaceEventHandler> event_handler_; | 45 std::unique_ptr<WorkspaceEventHandler> event_handler_; |
| 54 | 46 |
| 55 // Owned by |viewport_|. | 47 // Owned by |viewport_|. |
| 56 WorkspaceLayoutManager* layout_manager_; | 48 WorkspaceLayoutManager* layout_manager_; |
| 57 | 49 |
| 58 DISALLOW_COPY_AND_ASSIGN(WorkspaceController); | 50 DISALLOW_COPY_AND_ASSIGN(WorkspaceController); |
| 59 }; | 51 }; |
| 60 | 52 |
| 61 } // namespace ash | 53 } // namespace ash |
| 62 | 54 |
| 63 #endif // ASH_WM_WORKSPACE_CONTROLLER_H_ | 55 #endif // ASH_WM_WORKSPACE_CONTROLLER_H_ |
| OLD | NEW |