Chromium Code Reviews| Index: ash/common/wm_shell.h |
| diff --git a/ash/common/wm_shell.h b/ash/common/wm_shell.h |
| index 6a9632e2882ef997ea939453087b9a3c351ba0ec..0a8a1b7a4f58d76d48f6e78036aa1cea501fc9d2 100644 |
| --- a/ash/common/wm_shell.h |
| +++ b/ash/common/wm_shell.h |
| @@ -12,6 +12,7 @@ |
| #include "ash/ash_export.h" |
| #include "ash/common/metrics/user_metrics_action.h" |
| +#include "base/observer_list.h" |
| namespace gfx { |
| class Rect; |
| @@ -73,7 +74,7 @@ class ASH_EXPORT WmShell { |
| return window_selector_controller_.get(); |
| } |
| - virtual MruWindowTracker* GetMruWindowTracker() = 0; |
| + MruWindowTracker* mru_window_tracker() { return mru_window_tracker_.get(); } |
|
James Cook
2016/06/30 21:29:20
nit: put after keyboard_ui (I'm trying to keep the
sky
2016/06/30 21:49:41
Done, but similar comment to what I say below.
|
| // Creates a new window used as a container of other windows. No painting is |
| // done to the created window. |
| @@ -152,6 +153,11 @@ class ASH_EXPORT WmShell { |
| // Called after overview mode has ended. |
| virtual void OnOverviewModeEnded() = 0; |
| + // Notifies |observers_| when entering or exiting pinned mode for |
| + // |pinned_window|. Entering or exiting can be checked by looking at |
| + // |pinned_window|'s window state. |
| + void NotifyPinnedStateChanged(WmWindow* pinned_window); |
| + |
| virtual AccessibilityDelegate* GetAccessibilityDelegate() = 0; |
| virtual SessionStateDelegate* GetSessionStateDelegate() = 0; |
| @@ -162,8 +168,8 @@ class ASH_EXPORT WmShell { |
| virtual void AddDisplayObserver(WmDisplayObserver* observer) = 0; |
| virtual void RemoveDisplayObserver(WmDisplayObserver* observer) = 0; |
| - virtual void AddShellObserver(ShellObserver* observer) = 0; |
| - virtual void RemoveShellObserver(ShellObserver* observer) = 0; |
| + void AddShellObserver(ShellObserver* observer); |
| + void RemoveShellObserver(ShellObserver* observer); |
| virtual void AddPointerWatcher(views::PointerWatcher* watcher) = 0; |
| virtual void RemovePointerWatcher(views::PointerWatcher* watcher) = 0; |
| @@ -183,17 +189,26 @@ class ASH_EXPORT WmShell { |
| void SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui); |
| + base::ObserverList<ShellObserver>* shell_observers() { |
|
James Cook
2016/06/30 21:29:20
nit: simple getter above SetKeyboardUI
sky
2016/06/30 21:49:41
Done. I will add though that sort of style is more
|
| + return &shell_observers_; |
| + } |
| + |
| // Sets and initializes the |delegate|. |
| void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate); |
| void DeleteSystemTrayDelegate(); |
| void DeleteWindowSelectorController(); |
| + void CreateMruWindowTracker(); |
| + void DeleteMruWindowTracker(); |
| + |
| private: |
| friend class Shell; |
| static WmShell* instance_; |
| + base::ObserverList<ShellObserver> shell_observers_; |
| + |
| std::unique_ptr<FocusCycler> focus_cycler_; |
| std::unique_ptr<KeyboardUI> keyboard_ui_; |
| std::unique_ptr<SystemTrayNotifier> system_tray_notifier_; |
| @@ -202,6 +217,8 @@ class ASH_EXPORT WmShell { |
| bool simulate_modal_window_open_for_testing_ = false; |
| + std::unique_ptr<MruWindowTracker> mru_window_tracker_; |
|
James Cook
2016/06/30 21:29:20
ditto
sky
2016/06/30 21:49:41
Done, and I'll ditto my nit from above;)
|
| + |
| #if defined(OS_CHROMEOS) |
| std::unique_ptr<LogoutConfirmationController> logout_confirmation_controller_; |
| #endif |