Chromium Code Reviews| 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..099620c2973198389a6c5aa3801c72ca2e4a23e5 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_; } |
|
sky
2011/11/02 03:57:49
nit: this actually isn't a viewport. A viewport is
|
| + |
| // Create new workspace. Workspace objects are managed by |
| // this WorkspaceManager. Deleting workspace will automatically |
| // remove the workspace from the workspace_manager. |
| @@ -62,6 +68,20 @@ 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. |
| + // LayoutManager for this workspace manager request must not modify |
|
sky
2011/11/02 03:57:49
How about replacing the second sentence with: 'Whe
|
| + // the requested bounds in |SetChildBounds| when this flag is true. |
| + bool layout_in_progress() const nj{ return layout_in_progress_; } |
|
sky
2011/11/02 03:57:49
remove 'nj'
|
| + |
| + // 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 +113,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); |
| }; |