Chromium Code Reviews| Index: ash/common/wm_shell.h |
| diff --git a/ash/common/wm_shell.h b/ash/common/wm_shell.h |
| index 3a34e364139bc846f97dccab6e4602c15ce4d265..a51c65462634859b58d477ccbd03aa99330f1e34 100644 |
| --- a/ash/common/wm_shell.h |
| +++ b/ash/common/wm_shell.h |
| @@ -21,7 +21,9 @@ namespace ash { |
| class AccessibilityDelegate; |
| class MruWindowTracker; |
| class SessionStateDelegate; |
| +class Shell; |
|
msw
2016/06/10 20:48:10
nit: needed?
|
| class ShellObserver; |
| +class SystemTrayDelegate; |
| class WindowResizer; |
| class WmActivationObserver; |
| class WmDisplayObserver; |
| @@ -43,6 +45,10 @@ class ASH_EXPORT WmShell { |
| static WmShell* Get(); |
| static bool HasInstance() { return instance_ != nullptr; } |
| + SystemTrayDelegate* system_tray_delegate() { |
| + return system_tray_delegate_.get(); |
| + } |
| + |
| virtual MruWindowTracker* GetMruWindowTracker() = 0; |
| // Creates a new window used as a container of other windows. No painting is |
| @@ -115,10 +121,19 @@ class ASH_EXPORT WmShell { |
| virtual void RemoveShellObserver(ShellObserver* observer) = 0; |
| protected: |
| - virtual ~WmShell() {} |
| + WmShell(); |
| + virtual ~WmShell(); |
| + |
| + // If |delegate| is not null, sets and initializes the delegate. If |delegate| |
| + // is null, shuts down and destroys the delegate. |
| + void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate); |
| private: |
| + friend class Shell; |
| + |
| static WmShell* instance_; |
| + |
| + std::unique_ptr<SystemTrayDelegate> system_tray_delegate_; |
| }; |
| } // namespace ash |