Index: ash/wm/workspace/workspace_manager.h |
diff --git a/ash/wm/workspace/workspace_manager.h b/ash/wm/workspace/workspace_manager.h |
index e59eada1c6ea9d7d1c4898926fc050fcfde8b101..983328eb8547b71030d0f2326be9099f168a8a4b 100644 |
--- a/ash/wm/workspace/workspace_manager.h |
+++ b/ash/wm/workspace/workspace_manager.h |
@@ -53,6 +53,12 @@ class Workspace; |
// are maximized and restored they are reparented to the right Window. |
class ASH_EXPORT WorkspaceManager : public ash::ShellObserver { |
public: |
+ |
sky
2012/11/28 15:15:34
remove newline.
|
+ enum Direction { |
+ WORKSPACE_ABOVE, |
sky
2012/11/28 15:15:34
Above and below are not clear in this content. How
|
+ WORKSPACE_BELOW |
+ }; |
+ |
explicit WorkspaceManager(aura::Window* viewport); |
virtual ~WorkspaceManager(); |
@@ -78,9 +84,17 @@ class ASH_EXPORT WorkspaceManager : public ash::ShellObserver { |
// when a new Window is being added. |
aura::Window* GetParentForNewWindow(aura::Window* window); |
+ // Called by the workspace cycler to activate the next workspace in |
+ // |direction|. Returns false if there are no more workspaces to cycle |
+ // to in |direction|. |
+ bool CycleToWorkspace(Direction direction); |
+ |
// Starts the animation that occurs on first login. |
void DoInitialAnimation(); |
+ // Returns the window of the currently active workspace. |
+ aura::Window* GetActiveWorkspaceWindow() const; |
sky
2012/11/28 15:15:34
Should either return const or not be const.
|
+ |
// ShellObserver overrides: |
virtual void OnAppTerminating() OVERRIDE; |
@@ -106,6 +120,9 @@ class ASH_EXPORT WorkspaceManager : public ash::ShellObserver { |
// rather we run the animations as if a switch occurred. |
SWITCH_INITIAL, |
+ // Switch as the result of cycling through workspaces. |
+ SWITCH_CYCLE_WORKSPACE, |
+ |
// Edge case. See comment in OnWorkspaceWindowShowStateChanged(). Don't |
// make other types randomly use this! |
SWITCH_OTHER, |
@@ -147,8 +164,8 @@ class ASH_EXPORT WorkspaceManager : public ash::ShellObserver { |
// windows. If |stack_beneath| is non-NULL the windows are stacked beneath it. |
void MoveChildrenToDesktop(aura::Window* window, aura::Window* stack_beneath); |
- // Selects the next workspace. |
- void SelectNextWorkspace(SwitchReason reason); |
+ // Selects the workspace below the active workspace if any. |
+ void SelectWorkspaceBelow(SwitchReason reason); |
sky
2012/11/28 15:15:34
Keep the old name, its clearer since below doesn't
|
// Schedules |workspace| for deletion when it no longer contains any layers. |
// See comments above |to_delete_| as to why we do this. |