| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ash/desktop_background/desktop_background_resources.h" | 10 #include "ash/desktop_background/desktop_background_resources.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 void SetUserWallpaperInfo(const std::string& username, | 158 void SetUserWallpaperInfo(const std::string& username, |
| 159 const WallpaperInfo& info, | 159 const WallpaperInfo& info, |
| 160 bool is_persistent); | 160 bool is_persistent); |
| 161 | 161 |
| 162 // Sets last selected user on user pod row. | 162 // Sets last selected user on user pod row. |
| 163 void SetLastSelectedUser(const std::string& last_selected_user); | 163 void SetLastSelectedUser(const std::string& last_selected_user); |
| 164 | 164 |
| 165 // Sets |email|'s wallpaper. | 165 // Sets |email|'s wallpaper. |
| 166 void SetUserWallpaper(const std::string& email); | 166 void SetUserWallpaper(const std::string& email); |
| 167 | 167 |
| 168 // Sets the default wallpaper for the sign-in screen. |
| 169 void SetSigninWallpaper(); |
| 170 |
| 168 // Sets wallpaper to |wallpaper|. | 171 // Sets wallpaper to |wallpaper|. |
| 169 void SetWallpaperFromImageSkia(const gfx::ImageSkia& wallpaper, | 172 void SetWallpaperFromImageSkia(const gfx::ImageSkia& wallpaper, |
| 170 ash::WallpaperLayout layout); | 173 ash::WallpaperLayout layout); |
| 171 | 174 |
| 172 // User was deselected at login screen, reset wallpaper if needed. | |
| 173 void OnUserDeselected() {} | |
| 174 | |
| 175 // User |email| was selected at login screen, load wallpaper. | |
| 176 void OnUserSelected(const std::string& email); | |
| 177 | |
| 178 private: | 175 private: |
| 179 typedef std::map<std::string, gfx::ImageSkia> CustomWallpaperMap; | 176 typedef std::map<std::string, gfx::ImageSkia> CustomWallpaperMap; |
| 180 | 177 |
| 181 virtual ~WallpaperManager(); | 178 virtual ~WallpaperManager(); |
| 182 | 179 |
| 183 // Change the wallpapers for users who choose DAILY wallpaper type. Updates | 180 // Change the wallpapers for users who choose DAILY wallpaper type. Updates |
| 184 // current wallpaper if it changed. This function should be called at exactly | 181 // current wallpaper if it changed. This function should be called at exactly |
| 185 // at 0am if chromeos device is on. | 182 // at 0am if chromeos device is on. |
| 186 void BatchUpdateWallpaper(); | 183 void BatchUpdateWallpaper(); |
| 187 | 184 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 content::NotificationRegistrar registrar_; | 330 content::NotificationRegistrar registrar_; |
| 334 | 331 |
| 335 base::OneShotTimer<WallpaperManager> timer_; | 332 base::OneShotTimer<WallpaperManager> timer_; |
| 336 | 333 |
| 337 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); | 334 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); |
| 338 }; | 335 }; |
| 339 | 336 |
| 340 } // namespace chromeos | 337 } // namespace chromeos |
| 341 | 338 |
| 342 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ | 339 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ |
| OLD | NEW |