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

Unified Diff: ash/common/wm_shell.cc

Issue 2144363003: Create ash media delegate earlier during ash shell initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shelldelegates
Patch Set: Initialize method 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 a1b8d99259d16ce0077b11309bc44b47b0ee7977..bb012d7abb237310a4c141fbfe0bbdaf163b45e2 100644
--- a/ash/common/wm_shell.cc
+++ b/ash/common/wm_shell.cc
@@ -42,6 +42,12 @@ WmShell* WmShell::Get() {
return instance_;
}
+void WmShell::Initialize() {
+ // Some delegates access WmShell during their construction. Create them here
+ // instead of the WmShell constructor.
James Cook 2016/07/14 22:03:24 This is not strictly needed for the media delegate
msw 2016/07/14 22:49:34 Acknowledged.
+ media_delegate_.reset(delegate_->CreateMediaDelegate());
+}
+
void WmShell::OnMaximizeModeStarted() {
FOR_EACH_OBSERVER(ShellObserver, shell_observers_, OnMaximizeModeStarted());
}
@@ -105,10 +111,6 @@ void WmShell::SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui) {
keyboard_ui_ = std::move(keyboard_ui);
}
-void WmShell::SetMediaDelegate(std::unique_ptr<MediaDelegate> delegate) {
- media_delegate_ = std::move(delegate);
-}
-
void WmShell::SetSystemTrayDelegate(
std::unique_ptr<SystemTrayDelegate> delegate) {
DCHECK(delegate);
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/mus/bridge/wm_shell_mus.cc » ('j') | ash/shell.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698