Chromium Code Reviews| 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( | |
| 267 const std::string& user_id, | |
|
bshe
2014/07/29 18:54:58
nit: indent is off
Thiemo Nagel
2014/07/30 13:29:25
Done.
| |
| 268 const gfx::ImageSkia& image, | |
| 269 bool update_wallpaper, | |
| 270 bool cryptohome_success, | |
| 271 const std::string& user_id_hash); | |
| 272 | |
| 265 // Saves custom wallpaper to file, post task to generate thumbnail and updates | 273 // Saves custom wallpaper to file, post task to generate thumbnail and updates |
| 266 // local state preferences. If |update_wallpaper| is false, don't change | 274 // local state preferences. If |update_wallpaper| is false, don't change |
| 267 // wallpaper but only update cache. | 275 // wallpaper but only update cache. |
| 268 void SetCustomWallpaper(const std::string& user_id, | 276 void SetCustomWallpaper(const std::string& user_id, |
| 269 const std::string& user_id_hash, | 277 const std::string& user_id_hash, |
| 270 const std::string& file, | 278 const std::string& file, |
| 271 ash::WallpaperLayout layout, | 279 ash::WallpaperLayout layout, |
| 272 user_manager::User::WallpaperType type, | 280 user_manager::User::WallpaperType type, |
| 273 const gfx::ImageSkia& image, | 281 const gfx::ImageSkia& image, |
| 274 bool update_wallpaper); | 282 bool update_wallpaper); |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 618 | 626 |
| 619 // Current decoded default image is stored in cache. | 627 // Current decoded default image is stored in cache. |
| 620 scoped_ptr<user_manager::UserImage> default_wallpaper_image_; | 628 scoped_ptr<user_manager::UserImage> default_wallpaper_image_; |
| 621 | 629 |
| 622 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); | 630 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); |
| 623 }; | 631 }; |
| 624 | 632 |
| 625 } // namespace chromeos | 633 } // namespace chromeos |
| 626 | 634 |
| 627 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_ | 635 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_ |
| OLD | NEW |