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

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: Rebase 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
Index: ui/aura_shell/shell.h
diff --git a/ui/aura_shell/shell.h b/ui/aura_shell/shell.h
index 702142544c9c5773f49c014638d258fdc53ba2cc..79141ff1ca3176c7adb84d6382939df155a10a29 100644
--- a/ui/aura_shell/shell.h
+++ b/ui/aura_shell/shell.h
@@ -40,16 +40,13 @@ class AURA_SHELL_EXPORT Shell : public aura::StackingClient {
public:
// Upon creation, the Shell sets itself as the Desktop's delegate, which takes
// ownership of the Shell.
- Shell();
- virtual ~Shell();
-
- static Shell* GetInstance();
- void Init();
+ // 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);
- // Sets the delegate. Shell owns its delegate.
- void SetDelegate(ShellDelegate* delegate);
- ShellDelegate* delegate() { return delegate_.get(); }
+ // Should never be called before |CreateInstance()|.
+ static Shell* GetInstance();
aura::Window* GetContainer(int container_id);
const aura::Window* GetContainer(int container_id) const;
@@ -57,11 +54,17 @@ class AURA_SHELL_EXPORT Shell : public aura::StackingClient {
// 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();

Powered by Google App Engine
This is Rietveld 408576698