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

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: Merge to trunk 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 64803e8917d50bf4819b8177747c482b8a77d846..6f6e36cccec84968796a36116cf8eb6ce321ca87 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -638,6 +638,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();
@@ -798,8 +800,11 @@ void Shell::InitLayoutManagers() {
new internal::WorkspaceController(default_container));
workspace_controller_->workspace_manager()->set_shelf(shelf_layout_manager);
- // 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