Chromium Code Reviews| 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..baf56e5da44d274a8ea533a02f741b215fb1c1aa 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 SaveUserWallpaperInfos(const std::string& username, |
|
Nikita (slow)
2012/07/23 22:06:47
s/Infos/Info/
bshe
2012/07/24 16:21:10
Done.
|
| + std::string file_name, |
|
Nikita (slow)
2012/07/23 22:06:47
std::string&
bshe
2012/07/24 16:21:10
Done.
|
| + 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(ash::WallpaperLayout layout, |
|
Nikita (slow)
2012/07/23 22:06:47
Please bring signature closer to SetWallpaperFromF
bshe
2012/07/24 16:21:10
Done.
|
| + const gfx::ImageSkia& wallpaper); |
| // User was deselected at login screen, reset wallpaper if needed. |
| void UserDeselected(); |
| @@ -49,15 +64,14 @@ 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(); |
| + void OnWallpaperLoaded(ash::WallpaperLayout layout, |
|
Nikita (slow)
2012/07/23 22:06:47
Please add comment
bshe
2012/07/24 16:21:10
Done.
|
| + const UserImage& user_image); |
| + |
| // Loads user image from its file. |
| scoped_refptr<UserImageLoader> image_loader_; |