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

Unified Diff: ash/common/wm_shell.cc

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.cc
diff --git a/ash/common/wm_shell.cc b/ash/common/wm_shell.cc
index bab48cce697e7237b8977401a9b6de60aae3dc6a..58f1cab1df276271b12509063214079bad90b079 100644
--- a/ash/common/wm_shell.cc
+++ b/ash/common/wm_shell.cc
@@ -53,8 +53,9 @@ void WmShell::RemoveShellObserver(ShellObserver* observer) {
shell_observers_.RemoveObserver(observer);
}
-WmShell::WmShell()
- : focus_cycler_(new FocusCycler),
+WmShell::WmShell(ShellDelegate* delegate)
+ : delegate_(delegate),
+ focus_cycler_(new FocusCycler),
system_tray_notifier_(new SystemTrayNotifier),
window_selector_controller_(new WindowSelectorController()) {}
@@ -84,6 +85,10 @@ void WmShell::SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui) {
keyboard_ui_ = std::move(keyboard_ui);
}
+void WmShell::DeleteShellDelegate() {
+ delegate_.reset();
+}
+
void WmShell::SetMediaDelegate(std::unique_ptr<MediaDelegate> delegate) {
media_delegate_ = std::move(delegate);
}

Powered by Google App Engine
This is Rietveld 408576698