Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Unified Diff: ui/aura_shell/shell.h

Issue 8509027: Add status area to Aura builds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move status area view ids back to chromeos Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura_shell/examples/aura_shell_main.cc ('k') | ui/aura_shell/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « ui/aura_shell/examples/aura_shell_main.cc ('k') | ui/aura_shell/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698