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