Index: ash/desktop_background/desktop_background_controller.cc |
diff --git a/ash/desktop_background/desktop_background_controller.cc b/ash/desktop_background/desktop_background_controller.cc |
index c5bb2664ac0ace825742ec11f31780e5cd3c0e5f..1fede0e66bdc37084c17909a225b2a72077fd60b 100644 |
--- a/ash/desktop_background/desktop_background_controller.cc |
+++ b/ash/desktop_background/desktop_background_controller.cc |
@@ -56,7 +56,7 @@ class DesktopBackgroundController::WallpaperOperation |
return wallpaper_; |
} |
- ImageLayout image_layout() { |
+ WallpaperLayout wallpaper_layout() { |
return layout_; |
} |
@@ -71,7 +71,7 @@ class DesktopBackgroundController::WallpaperOperation |
base::CancellationFlag cancel_flag_; |
const SkBitmap* wallpaper_; |
- ImageLayout layout_; |
+ WallpaperLayout layout_; |
int index_; |
DISALLOW_COPY_AND_ASSIGN(WallpaperOperation); |
@@ -103,6 +103,15 @@ void DesktopBackgroundController::SetDefaultWallpaper(int index) { |
true /* task_is_slow */); |
} |
+void DesktopBackgroundController::SetCustomWallpaper( |
+ const SkBitmap& wallpaper, WallpaperLayout layout) { |
flackr
2012/05/04 19:06:17
I believe we want 1 argument per line in function
bshe
2012/05/08 22:22:18
Done.
|
+ internal::RootWindowLayoutManager* root_window_layout = |
+ Shell::GetInstance()->root_window_layout(); |
+ root_window_layout->SetBackgroundLayer(NULL); |
+ internal::CreateDesktopBackground(wallpaper, layout); |
+ desktop_background_mode_ = BACKGROUND_IMAGE; |
+} |
+ |
void DesktopBackgroundController::CancelPendingWallpaperOperation() { |
// Set canceled flag of previous request to skip unneeded loading. |
if (wallpaper_op_.get()) |
@@ -145,7 +154,8 @@ void DesktopBackgroundController::SetDesktopBackgroundImageMode( |
Shell::GetInstance()->root_window_layout(); |
root_window_layout->SetBackgroundLayer(NULL); |
if(wo->wallpaper()) { |
- internal::CreateDesktopBackground(*wo->wallpaper(), wo->image_layout()); |
+ internal::CreateDesktopBackground(*wo->wallpaper(), |
Ben Goodger (Google)
2012/05/07 15:35:08
seems unnecessary?
bshe
2012/05/09 18:51:54
Sorry, just to clarify, do you mean two parameters
Ben Goodger (Google)
2012/05/09 19:53:13
The linewrapping is unnecessary.
|
+ wo->wallpaper_layout()); |
desktop_background_mode_ = BACKGROUND_IMAGE; |
} |
} |