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

Unified Diff: ash/common/wm_shell.h

Issue 2118593002: mash: Migrate ShellDelegate ownership and access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 5 months 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 | « ash/common/shell_delegate.h ('k') | ash/common/wm_shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm_shell.h
diff --git a/ash/common/wm_shell.h b/ash/common/wm_shell.h
index aa97f46c168a1f37db49c675379de39488dc8590..aa3036879cbed789f35a59495027ed0b0409226a 100644
--- a/ash/common/wm_shell.h
+++ b/ash/common/wm_shell.h
@@ -33,6 +33,7 @@ class MaximizeModeController;
class MruWindowTracker;
class ScopedDisableInternalMouseAndKeyboard;
class SessionStateDelegate;
+class ShellDelegate;
class ShellObserver;
class SystemTrayDelegate;
class SystemTrayNotifier;
@@ -61,6 +62,8 @@ class ASH_EXPORT WmShell {
static WmShell* Get();
static bool HasInstance() { return instance_ != nullptr; }
+ ShellDelegate* delegate() { return delegate_.get(); }
+
FocusCycler* focus_cycler() { return focus_cycler_.get(); }
KeyboardUI* keyboard_ui() { return keyboard_ui_.get(); }
@@ -207,7 +210,7 @@ class ASH_EXPORT WmShell {
#endif
protected:
- WmShell();
+ explicit WmShell(ShellDelegate* delegate);
virtual ~WmShell();
base::ObserverList<ShellObserver>* shell_observers() {
@@ -236,7 +239,7 @@ class ASH_EXPORT WmShell {
static WmShell* instance_;
base::ObserverList<ShellObserver> shell_observers_;
-
+ std::unique_ptr<ShellDelegate> delegate_;
std::unique_ptr<FocusCycler> focus_cycler_;
std::unique_ptr<KeyboardUI> keyboard_ui_;
std::unique_ptr<MaximizeModeController> maximize_mode_controller_;
« no previous file with comments | « ash/common/shell_delegate.h ('k') | ash/common/wm_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698