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

Unified Diff: ash/common/wm_shell.cc

Issue 2318223003: mash: Migrate wallpaper controllers to ash/common. (Closed)
Patch Set: Fix nit. Created 4 years, 3 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/wm_shell.h ('k') | ash/default_wallpaper_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm_shell.cc
diff --git a/ash/common/wm_shell.cc b/ash/common/wm_shell.cc
index c98fa1dbc15e3e32cd1d67fec634d25dd54f3742..e4d778ccc4066adc908135cd226e2e7b164fd82c 100644
--- a/ash/common/wm_shell.cc
+++ b/ash/common/wm_shell.cc
@@ -25,6 +25,7 @@
#include "ash/common/system/toast/toast_manager.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/system_tray_notifier.h"
+#include "ash/common/wallpaper/wallpaper_controller.h"
#include "ash/common/wallpaper/wallpaper_delegate.h"
#include "ash/common/wm/immersive_context_ash.h"
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
@@ -60,7 +61,9 @@ WmShell* WmShell::Get() {
return instance_;
}
-void WmShell::Initialize() {
+void WmShell::Initialize(const scoped_refptr<base::SequencedWorkerPool>& pool) {
+ blocking_pool_ = pool;
+
// Some delegates access WmShell during their construction. Create them here
// instead of the WmShell constructor.
accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate());
@@ -76,11 +79,15 @@ void WmShell::Initialize() {
views::FocusManagerFactory::Install(new AshFocusManagerFactory);
new_window_delegate_.reset(delegate_->CreateNewWindowDelegate());
+
+ wallpaper_controller_.reset(new WallpaperController(blocking_pool_));
}
void WmShell::Shutdown() {
- // Accesses WmShell in its destructor.
+ // These members access WmShell in their destructors.
+ wallpaper_controller_.reset();
accessibility_delegate_.reset();
+
// ShelfWindowWatcher has window observers and a pointer to the shelf model.
shelf_window_watcher_.reset();
// ShelfItemDelegate subclasses it owns have complex cleanup to run (e.g. ARC
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/default_wallpaper_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698