| Index: ui/aura_shell/workspace/workspace_manager.h
|
| diff --git a/ui/aura_shell/workspace/workspace_manager.h b/ui/aura_shell/workspace/workspace_manager.h
|
| index 28cbab51574e8cd301485190653290e0c13a0943..4bdb17bbdeb95bd060edeeff7367d3d42f53915e 100644
|
| --- a/ui/aura_shell/workspace/workspace_manager.h
|
| +++ b/ui/aura_shell/workspace/workspace_manager.h
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| +#include "base/observer_list.h"
|
| #include "ui/aura_shell/aura_shell_export.h"
|
| #include "ui/gfx/insets.h"
|
| #include "ui/gfx/size.h"
|
| @@ -25,6 +26,7 @@ class Rect;
|
| namespace aura_shell {
|
| namespace internal {
|
| class Workspace;
|
| +class WorkspaceObserver;
|
|
|
| // WorkspaceManager manages multiple workspaces in the desktop.
|
| class AURA_SHELL_EXPORT WorkspaceManager {
|
| @@ -32,6 +34,10 @@ class AURA_SHELL_EXPORT WorkspaceManager {
|
| explicit WorkspaceManager(aura::Window* viewport);
|
| virtual ~WorkspaceManager();
|
|
|
| + // Returns the viewport window this WorkspaceManager layouts
|
| + // workspaces on.
|
| + aura::Window* viewport() { return viewport_; }
|
| +
|
| // Create new workspace. Workspace objects are managed by
|
| // this WorkspaceManager. Deleting workspace will automatically
|
| // remove the workspace from the workspace_manager.
|
| @@ -62,6 +68,19 @@ class AURA_SHELL_EXPORT WorkspaceManager {
|
| // Sets the size of a single workspace (all workspaces have the same size).
|
| void SetWorkspaceSize(const gfx::Size& workspace_size);
|
|
|
| + // Adds/Removes workspace observer.
|
| + void AddObserver(WorkspaceObserver* observer);
|
| + void RemoveObserver(WorkspaceObserver* observer);
|
| +
|
| + // Returns true if this workspace manager is laying out windows.
|
| + // When true, LayoutManager must give windows their requested bounds.
|
| + bool layout_in_progress() const { return layout_in_progress_; }
|
| +
|
| + // Sets the |layout_in_progress_| flag.
|
| + void set_layout_in_progress(bool layout_in_progress) {
|
| + layout_in_progress_ = layout_in_progress;
|
| + }
|
| +
|
| private:
|
| friend class Workspace;
|
|
|
| @@ -93,6 +112,11 @@ class AURA_SHELL_EXPORT WorkspaceManager {
|
| // True if the workspace manager is in overview mode.
|
| bool is_overview_;
|
|
|
| + // True if this layout manager is laying out windows.
|
| + bool layout_in_progress_;
|
| +
|
| + ObserverList<WorkspaceObserver> observers_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(WorkspaceManager);
|
| };
|
|
|
|
|