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() { |