| 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_MANAGER_H_ | 5 #ifndef ASH_WM_WORKSPACE_WORKSPACE_MANAGER_H_ |
| 6 #define ASH_WM_WORKSPACE_WORKSPACE_MANAGER_H_ | 6 #define ASH_WM_WORKSPACE_WORKSPACE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 class Layer; | 36 class Layer; |
| 37 } | 37 } |
| 38 | 38 |
| 39 namespace ash { | 39 namespace ash { |
| 40 namespace internal { | 40 namespace internal { |
| 41 | 41 |
| 42 class DesktopBackgroundFadeController; | 42 class DesktopBackgroundFadeController; |
| 43 class ShelfLayoutManager; | 43 class ShelfLayoutManager; |
| 44 class WorkspaceCycler; | 44 class WorkspaceCycler; |
| 45 class WorkspaceCyclerAnimator; | 45 class WorkspaceCyclerAnimator; |
| 46 class WorkspaceEventHandler; |
| 46 class WorkspaceLayoutManager; | 47 class WorkspaceLayoutManager; |
| 47 class WorkspaceManagerTest2; | 48 class WorkspaceManagerTest2; |
| 48 class Workspace; | 49 class Workspace; |
| 49 | 50 |
| 50 // WorkspaceManager manages multiple workspaces in the desktop. Workspaces are | 51 // WorkspaceManager manages multiple workspaces in the desktop. Workspaces are |
| 51 // implicitly created as windows are maximized (or made fullscreen), and | 52 // implicitly created as windows are maximized (or made fullscreen), and |
| 52 // destroyed when maximized windows are closed or restored. There is always one | 53 // destroyed when maximized windows are closed or restored. There is always one |
| 53 // workspace for the desktop. | 54 // workspace for the desktop. |
| 54 // Internally WorkspaceManager creates a Window for each Workspace. As windows | 55 // Internally WorkspaceManager creates a Window for each Workspace. As windows |
| 55 // are maximized and restored they are reparented to the right Window. | 56 // are maximized and restored they are reparented to the right Window. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 72 | 73 |
| 73 void SetShelf(ShelfLayoutManager* shelf); | 74 void SetShelf(ShelfLayoutManager* shelf); |
| 74 | 75 |
| 75 // Activates the workspace containing |window|. Does nothing if |window| is | 76 // Activates the workspace containing |window|. Does nothing if |window| is |
| 76 // NULL or not contained in a workspace. | 77 // NULL or not contained in a workspace. |
| 77 void SetActiveWorkspaceByWindow(aura::Window* window); | 78 void SetActiveWorkspaceByWindow(aura::Window* window); |
| 78 | 79 |
| 79 // Returns the container window for the active workspace, never NULL. | 80 // Returns the container window for the active workspace, never NULL. |
| 80 aura::Window* GetActiveWorkspaceWindow(); | 81 aura::Window* GetActiveWorkspaceWindow(); |
| 81 | 82 |
| 83 WorkspaceEventHandler* GetEventHandlerForWindow(aura::Window* window); |
| 84 |
| 82 // Returns the parent for |window|. This is invoked from StackingController | 85 // Returns the parent for |window|. This is invoked from StackingController |
| 83 // when a new Window is being added. | 86 // when a new Window is being added. |
| 84 aura::Window* GetParentForNewWindow(aura::Window* window); | 87 aura::Window* GetParentForNewWindow(aura::Window* window); |
| 85 | 88 |
| 86 // Returns true if the user can start cycling through workspaces. | 89 // Returns true if the user can start cycling through workspaces. |
| 87 bool CanStartCyclingThroughWorkspaces() const; | 90 bool CanStartCyclingThroughWorkspaces() const; |
| 88 | 91 |
| 89 // Initializes |animator| with the workspace manager's current state on | 92 // Initializes |animator| with the workspace manager's current state on |
| 90 // behalf of the workspace cycler. | 93 // behalf of the workspace cycler. |
| 91 // This state should be cleared by the workspace cycler when | 94 // This state should be cleared by the workspace cycler when |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // finger vertical scroll. | 279 // finger vertical scroll. |
| 277 scoped_ptr<WorkspaceCycler> workspace_cycler_; | 280 scoped_ptr<WorkspaceCycler> workspace_cycler_; |
| 278 | 281 |
| 279 DISALLOW_COPY_AND_ASSIGN(WorkspaceManager); | 282 DISALLOW_COPY_AND_ASSIGN(WorkspaceManager); |
| 280 }; | 283 }; |
| 281 | 284 |
| 282 } // namespace internal | 285 } // namespace internal |
| 283 } // namespace ash | 286 } // namespace ash |
| 284 | 287 |
| 285 #endif // ASH_WM_WORKSPACE_WORKSPACE_MANAGER_H_ | 288 #endif // ASH_WM_WORKSPACE_WORKSPACE_MANAGER_H_ |
| OLD | NEW |