| Index: ash/desktop_background/desktop_background_controller.h
|
| diff --git a/ash/desktop_background/desktop_background_controller.h b/ash/desktop_background/desktop_background_controller.h
|
| index b603fbde546a71f3d1ec5cc661419252259394d7..92536b6d887b20729f09de54b36480baae54408d 100644
|
| --- a/ash/desktop_background/desktop_background_controller.h
|
| +++ b/ash/desktop_background/desktop_background_controller.h
|
| @@ -9,6 +9,7 @@
|
| #include "ash/ash_export.h"
|
| #include "ash/desktop_background/desktop_background_resources.h"
|
| #include "base/basictypes.h"
|
| +#include "base/memory/weak_ptr.h"
|
|
|
| class SkBitmap;
|
|
|
| @@ -46,6 +47,18 @@ class ASH_EXPORT DesktopBackgroundController {
|
| return desktop_background_mode_;
|
| }
|
|
|
| + // Load default wallpaper at |index| asynchronously and set to current
|
| + // wallpaper after loaded.
|
| + void SetDefaultWallpaper(int index);
|
| +
|
| + // Load guest wallpaper asynchronously and set to current wallpaper after
|
| + // loaded.
|
| + void SetGuestWallpaper();
|
| +
|
| + // Load logged in user wallpaper asynchronously and set to current wallpaper
|
| + // after loaded.
|
| + void SetLoggedInUserWallpaper();
|
| +
|
| // Sets the desktop background to image mode and create a new background
|
| // widget with user selected wallpaper or default wallpaper. Delete the old
|
| // widget if any.
|
| @@ -56,8 +69,18 @@ class ASH_EXPORT DesktopBackgroundController {
|
| void SetDesktopBackgroundSolidColorMode();
|
|
|
| private:
|
| + // Start to load default wallpaper asynchronously.
|
| + void OnWallpaperLoadStarted(int index);
|
| +
|
| + // Default wallpapper loaded, set the background mode to image mode.
|
| + void OnWallpaperLoadCompleted();
|
| +
|
| // Can change at runtime.
|
| BackgroundMode desktop_background_mode_;
|
| + const SkBitmap* wallpaper_;
|
| + ImageLayout layout_;
|
| + int previous_index_;
|
| + base::WeakPtrFactory<DesktopBackgroundController> weak_ptr_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController);
|
| };
|
|
|