| Index: ui/aura_shell/shell.h
|
| diff --git a/ui/aura_shell/shell.h b/ui/aura_shell/shell.h
|
| index 5abe2b065232a25ff57f7f202d2fa04b8945a13f..1b4c719f3c7af0f3bcbacd60ee931de3c12df6cf 100644
|
| --- a/ui/aura_shell/shell.h
|
| +++ b/ui/aura_shell/shell.h
|
| @@ -39,17 +39,15 @@ class AURA_SHELL_EXPORT Shell {
|
| public:
|
| // Upon creation, the Shell sets itself as the Desktop's delegate, which takes
|
| // ownership of the Shell.
|
| - Shell();
|
| - virtual ~Shell();
|
|
|
| - static Shell* GetInstance();
|
| - static void DeleteInstanceForTesting();
|
| + // A shell must be explicitly created so that it can call |Init()| with the
|
| + // delegate set. |delegate| can be NULL (if not required for initialization).
|
| + static Shell* CreateInstance(ShellDelegate* delegate);
|
|
|
| - void Init();
|
| + // Should never be called before |CreateInstance()|.
|
| + static Shell* GetInstance();
|
|
|
| - // Sets the delegate. Shell owns its delegate.
|
| - void SetDelegate(ShellDelegate* delegate);
|
| - ShellDelegate* delegate() { return delegate_.get(); }
|
| + static void DeleteInstanceForTesting();
|
|
|
| aura::Window* GetContainer(int container_id);
|
| const aura::Window* GetContainer(int container_id) const;
|
| @@ -57,11 +55,17 @@ class AURA_SHELL_EXPORT Shell {
|
| // Toggles between overview mode and normal mode.
|
| void ToggleOverview();
|
|
|
| + ShellDelegate* delegate() { return delegate_.get(); }
|
| Launcher* launcher() { return launcher_.get(); }
|
|
|
| private:
|
| typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair;
|
|
|
| + explicit Shell(ShellDelegate* delegate);
|
| + virtual ~Shell();
|
| +
|
| + void Init();
|
| +
|
| // Enables WorkspaceManager.
|
| void EnableWorkspaceManager();
|
|
|
|
|