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

Unified Diff: chrome/browser/ui/ash/ash_init.cc

Issue 2772313004: [ash-md] WIP Added wallpaper color caching. (Closed)
Patch Set: "Working'ish" prototype Created 3 years, 9 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: chrome/browser/ui/ash/ash_init.cc
diff --git a/chrome/browser/ui/ash/ash_init.cc b/chrome/browser/ui/ash/ash_init.cc
index 388a113441e27348845896572b842567904be795..583f16f5661b40b75074e4cbd00a139614236a50 100644
--- a/chrome/browser/ui/ash/ash_init.cc
+++ b/chrome/browser/ui/ash/ash_init.cc
@@ -36,6 +36,9 @@
#include "ui/aura/env.h"
#include "ui/aura/window_tree_host.h"
+#include "ash/common/wallpaper/wallpaper_controller.h"
+#include "components/wallpaper/pref_based_wallpaper_color_cache.h"
+
#if defined(USE_X11)
#include "ui/base/x/x11_util.h" // nogncheck
#endif
@@ -98,6 +101,14 @@ void OpenAsh(gfx::AcceleratedWidget remote_window) {
g_browser_process->platform_part()->RegisterKeepAlive();
}
ash::Shell::GetPrimaryRootWindow()->GetHost()->Show();
+
+ // TODO(bruthig): Is this the right place to initialize the cache? Maybe
+ // it be initialized Ash side and wrap ash::Shell::pref_store() some how?
+ // TODO(bruthig): Merge with master.
+ // TODO(bruthig): Don't leak the cache.
+ ash::Shell::GetInstance()->wallpaper_controller()->SetWallpaperColorCache(
jonross 2017/03/28 14:33:28 This may be more appropriate in the chromeos::Wall
bruthig 2017/03/28 15:18:50 I tried to initialize the cache in the WallpaperMa
jonross 2017/03/28 18:24:35 That's a bit scary. A lot of login screen code rel
+ new wallpaper::PrefBasedWallpaperColorCache(
+ g_browser_process->local_state()));
}
void CloseAsh() {

Powered by Google App Engine
This is Rietveld 408576698