| Index: chrome/browser/chromeos/login/wallpaper_manager.h
|
| diff --git a/chrome/browser/chromeos/login/wallpaper_manager.h b/chrome/browser/chromeos/login/wallpaper_manager.h
|
| index 50fce515f4a9f4d17deefd2a4e56983c1861dbce..63a0fffb4044927b7f10e23879ff94a4c83fd9b0 100644
|
| --- a/chrome/browser/chromeos/login/wallpaper_manager.h
|
| +++ b/chrome/browser/chromeos/login/wallpaper_manager.h
|
| @@ -10,12 +10,15 @@
|
| #include "ash/desktop_background/desktop_background_resources.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/timer.h"
|
| +#include "chrome/browser/chromeos/login/user.h"
|
| #include "chrome/browser/chromeos/login/user_image.h"
|
| #include "chrome/browser/chromeos/login/user_image_loader.h"
|
| #include "chrome/browser/chromeos/power/resume_observer.h"
|
| #include "chrome/browser/chromeos/system/timezone_settings.h"
|
| #include "unicode/timezone.h"
|
|
|
| +class PrefService;
|
| +
|
| namespace chromeos {
|
|
|
| // This class maintains wallpapers for users who have logged into this Chrome
|
| @@ -27,6 +30,9 @@ class WallpaperManager: public system::TimezoneSettings::Observer,
|
|
|
| WallpaperManager();
|
|
|
| + // Registers wallpaper manager preferences.
|
| + static void RegisterPrefs(PrefService* local_state);
|
| +
|
| // Adds PowerManagerClient observer. It needs to be added after
|
| // PowerManagerClient initialized.
|
| void AddPowerManagerClientObserver();
|
| @@ -35,13 +41,22 @@ class WallpaperManager: public system::TimezoneSettings::Observer,
|
| // Cancel any previous timer if any.
|
| void RestartTimer();
|
|
|
| + // Saves |username| selected wallpaper information to local state.
|
| + void SaveUserWallpaperInfo(const std::string& username,
|
| + const std::string& file_name,
|
| + ash::WallpaperLayout layout,
|
| + User::WallpaperType type);
|
| +
|
| // Sets last selected user on user pod row.
|
| void SetLastSelectedUser(const std::string& last_selected_user);
|
|
|
| // Sets wallpaper to the image file |path| points to.
|
| - void SetWallpaperFromFile(std::string email,
|
| - const std::string& path,
|
| - ash::WallpaperLayout layout);
|
| + void SetWallpaperFromFilePath(const std::string& path,
|
| + ash::WallpaperLayout layout);
|
| +
|
| + // Sets wallpaper to |wallpaper|.
|
| + void SetWallpaperFromImageSkia(const gfx::ImageSkia& wallpaper,
|
| + ash::WallpaperLayout layout);
|
|
|
| // User was deselected at login screen, reset wallpaper if needed.
|
| void UserDeselected();
|
| @@ -49,15 +64,15 @@ class WallpaperManager: public system::TimezoneSettings::Observer,
|
| private:
|
| virtual ~WallpaperManager();
|
|
|
| - void OnCustomWallpaperLoaded(const std::string& email,
|
| - ash::WallpaperLayout layout,
|
| - const UserImage& user_image);
|
| -
|
| // Change the wallpapers for users who choose DAILY wallpaper type. Updates
|
| // current wallpaper if it changed. This function should be called at exactly
|
| // at 0am if chromeos device is on.
|
| void BatchUpdateWallpaper();
|
|
|
| + // Sets wallpaper to image in |user_image| with |layout|.
|
| + void OnWallpaperLoaded(ash::WallpaperLayout layout,
|
| + const UserImage& user_image);
|
| +
|
| // Loads user image from its file.
|
| scoped_refptr<UserImageLoader> image_loader_;
|
|
|
|
|