| 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..8d3c63a0677f64076661f47e8feaa529f2b52571 100644
|
| --- a/ash/wm/workspace/workspace_manager.h
|
| +++ b/ash/wm/workspace/workspace_manager.h
|
| @@ -78,9 +78,25 @@ 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 hide the active workspace and activate
|
| + // the next unhidden workspace. The active workspace is moved to
|
| + // |hidden_workspaces_|.
|
| + // Returns false if the active workspace is the desktop workspace which
|
| + // cannot be hidden.
|
| + bool CycleToNextUnhiddenWorkspace();
|
| +
|
| + // Called by the workspace cycler to activate the workspace in
|
| + // |hidden_workspaces_| which was most recently added. Activating the
|
| + // workspace moves it to |workspaces_|.
|
| + // Returns false if |hidden_workspaces| is empty.
|
| + bool CycleToNextHiddenWorkspace();
|
| +
|
| // Starts the animation that occurs on first login.
|
| void DoInitialAnimation();
|
|
|
| + // Returns the window of the currently active workspace.
|
| + aura::Window* GetActiveWorkspaceWindow() const;
|
| +
|
| // ShellObserver overrides:
|
| virtual void OnAppTerminating() OVERRIDE;
|
|
|
| @@ -137,11 +153,11 @@ class ASH_EXPORT WorkspaceManager : public ash::ShellObserver {
|
|
|
| // Moves all the non-maximized child windows of |workspace| to the desktop
|
| // stacked beneath |stack_beneath| (if non-NULL). After moving child windows
|
| - // if |workspace| contains no children it is deleted, otherwise it it moved to
|
| - // |pending_workspaces_|.
|
| - void MoveWorkspaceToPendingOrDelete(Workspace* workspace,
|
| - aura::Window* stack_beneath,
|
| - SwitchReason reason);
|
| + // if |workspace| contains no children it is deleted. Otherwise, it is moved
|
| + // to |hidden_workspaces_|.
|
| + void MoveWorkspaceToHiddenOrDelete(Workspace* workspace,
|
| + aura::Window* stack_beneath,
|
| + SwitchReason reason);
|
|
|
| // Moves the children of |window| to the desktop. This excludes certain
|
| // windows. If |stack_beneath| is non-NULL the windows are stacked beneath it.
|
| @@ -207,11 +223,14 @@ class ASH_EXPORT WorkspaceManager : public ash::ShellObserver {
|
| // which identifies the desktop.
|
| Workspaces workspaces_;
|
|
|
| - // The set of workspaces not currently active. Workspaces ended up here in
|
| - // two scenarios:
|
| - // . Prior to adding a window a new worskpace is created for it. The
|
| - // Workspace is added to this set.
|
| - // . When the maximized window is minimized the workspace is added here.
|
| + // List of inactive workspaces which were deactivated as a result of a user
|
| + // action. Workspaces are moved here from |workspaces_| when the workspace's
|
| + // maximized window is minimized or hidden. The workspace is moved back to
|
| + // |workspaces_| when one of its windows is activated.
|
| + Workspaces hidden_workspaces_;
|
| +
|
| + // Set of workspaces that have never been activated. Workspaces for new
|
| + // windows prior to those windows being activated are added to this set.
|
| // Once any window in the workspace is activated the workspace is moved to
|
| // |workspaces_|.
|
| std::set<Workspace*> pending_workspaces_;
|
| @@ -219,10 +238,10 @@ class ASH_EXPORT WorkspaceManager : public ash::ShellObserver {
|
| // Owned by the Shell. May be NULL.
|
| ShelfLayoutManager* shelf_;
|
|
|
| - // Whether or not we're in MoveWorkspaceToPendingOrDelete(). As
|
| - // MoveWorkspaceToPendingOrDelete() may trigger another call to
|
| - // MoveWorkspaceToPendingOrDelete() we use this to avoid doing anything if
|
| - // already in MoveWorkspaceToPendingOrDelete().
|
| + // Whether or not we're in MoveWorkspaceToHiddenOrDelete(). As
|
| + // MoveWorkspaceToHiddenOrDelete() may trigger another call to
|
| + // MoveWorkspaceToHiddenOrDelete() we use this to avoid doing anything if
|
| + // already in MoveWorkspaceToHiddenOrDelete().
|
| bool in_move_;
|
|
|
| // Ideally we would delete workspaces when not needed. Unfortunately doing so
|
|
|