OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_USERS_WALLPAPER_WALLPAPER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 void InitializeWallpaper(); | 255 void InitializeWallpaper(); |
256 | 256 |
257 // NotificationObserver overrides: | 257 // NotificationObserver overrides: |
258 virtual void Observe(int type, | 258 virtual void Observe(int type, |
259 const content::NotificationSource& source, | 259 const content::NotificationSource& source, |
260 const content::NotificationDetails& details) OVERRIDE; | 260 const content::NotificationDetails& details) OVERRIDE; |
261 | 261 |
262 // Removes all |user_id| related wallpaper info and saved wallpapers. | 262 // Removes all |user_id| related wallpaper info and saved wallpapers. |
263 void RemoveUserWallpaperInfo(const std::string& user_id); | 263 void RemoveUserWallpaperInfo(const std::string& user_id); |
264 | 264 |
| 265 // Calls SetCustomWallpaper() with |user_id_hash| received from cryptohome. |
| 266 void SetCustomWallpaperOnSanitizedUsername(const std::string& user_id, |
| 267 const gfx::ImageSkia& image, |
| 268 bool update_wallpaper, |
| 269 bool cryptohome_success, |
| 270 const std::string& user_id_hash); |
| 271 |
265 // Saves custom wallpaper to file, post task to generate thumbnail and updates | 272 // Saves custom wallpaper to file, post task to generate thumbnail and updates |
266 // local state preferences. If |update_wallpaper| is false, don't change | 273 // local state preferences. If |update_wallpaper| is false, don't change |
267 // wallpaper but only update cache. | 274 // wallpaper but only update cache. |
268 void SetCustomWallpaper(const std::string& user_id, | 275 void SetCustomWallpaper(const std::string& user_id, |
269 const std::string& user_id_hash, | 276 const std::string& user_id_hash, |
270 const std::string& file, | 277 const std::string& file, |
271 ash::WallpaperLayout layout, | 278 ash::WallpaperLayout layout, |
272 user_manager::User::WallpaperType type, | 279 user_manager::User::WallpaperType type, |
273 const gfx::ImageSkia& image, | 280 const gfx::ImageSkia& image, |
274 bool update_wallpaper); | 281 bool update_wallpaper); |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 | 625 |
619 // Current decoded default image is stored in cache. | 626 // Current decoded default image is stored in cache. |
620 scoped_ptr<user_manager::UserImage> default_wallpaper_image_; | 627 scoped_ptr<user_manager::UserImage> default_wallpaper_image_; |
621 | 628 |
622 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); | 629 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); |
623 }; | 630 }; |
624 | 631 |
625 } // namespace chromeos | 632 } // namespace chromeos |
626 | 633 |
627 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_ | 634 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_ |
OLD | NEW |