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

Unified Diff: ash/shell.cc

Issue 9764012: Restore to user selected wallpaper after browser crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review and fix a segfault when starting chrome after saving data to local state. Created 8 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: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 395d2bf6a3582c00dc5f3b8be6ad74899a6472a1..54c6d3176f74191ffead4c18404b41afd276a28c 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -598,6 +598,8 @@ void Shell::Init() {
// This controller needs to be set before SetupManagedWindowMode.
desktop_background_controller_.reset(new DesktopBackgroundController);
+ if (delegate_.get())
+ user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate());
InitLayoutManagers();
@@ -753,8 +755,11 @@ void Shell::InitLayoutManagers() {
// Ensure launcher is visible.
launcher_->widget()->Show();
- // Create the desktop background image.
- desktop_background_controller_->SetDefaultDesktopBackgroundImage();
+ // Create desktop background widget.
+ // TODO(bshe): We should be able to use OnDesktopBackgroundChanged function
+ // here after issue 117244 got fixed.
+ desktop_background_controller_->SetDesktopBackgroundImageMode(
+ GetWallpaper(user_wallpaper_delegate_->GetUserWallpaperIndex()));
}
void Shell::DisableWorkspaceGridLayout() {

Powered by Google App Engine
This is Rietveld 408576698