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

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: Cleanup. 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
Index: ash/common/wm_shell.h
diff --git a/ash/common/wm_shell.h b/ash/common/wm_shell.h
index aa97f46c168a1f37db49c675379de39488dc8590..c44730d0ebf63030576a7bdfec11be27359008d5 100644
--- a/ash/common/wm_shell.h
+++ b/ash/common/wm_shell.h
@@ -13,6 +13,7 @@
#include "ash/ash_export.h"
#include "ash/common/media_delegate.h"
#include "ash/common/metrics/user_metrics_action.h"
+#include "ash/common/shell_delegate.h"
James Cook 2016/07/06 21:27:27 Can this be forward declared? wm_shell.h is widely
msw 2016/07/06 21:58:55 Done.
#include "base/observer_list.h"
namespace gfx {
@@ -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() {
@@ -218,6 +221,7 @@ class ASH_EXPORT WmShell {
// Helpers to set (and initialize) or destroy various delegates.
// TODO(msw|jamescook): Remove these once ShellDelegate, etc. are ported.
+ void DeleteShellDelegate();
James Cook 2016/07/06 21:27:27 I don't see this called in your CL.
msw 2016/07/06 21:58:55 Removed.
void SetMediaDelegate(std::unique_ptr<MediaDelegate> delegate);
void SetSystemTrayDelegate(std::unique_ptr<SystemTrayDelegate> delegate);
void DeleteSystemTrayDelegate();
@@ -236,7 +240,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') | ash/mus/window_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698