| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 bool GetLoggedInUserWallpaperInfo(WallpaperInfo* info); | 251 bool GetLoggedInUserWallpaperInfo(WallpaperInfo* info); |
| 252 | 252 |
| 253 // Initializes wallpaper. If logged in, loads user's wallpaper. If not logged | 253 // Initializes wallpaper. If logged in, loads user's wallpaper. If not logged |
| 254 // in, uses a solid color wallpaper. If logged in as a stub user, uses an | 254 // in, uses a solid color wallpaper. If logged in as a stub user, uses an |
| 255 // empty wallpaper. | 255 // empty wallpaper. |
| 256 void InitializeWallpaper(); | 256 void InitializeWallpaper(); |
| 257 | 257 |
| 258 // NotificationObserver overrides: | 258 // NotificationObserver overrides: |
| 259 virtual void Observe(int type, | 259 virtual void Observe(int type, |
| 260 const content::NotificationSource& source, | 260 const content::NotificationSource& source, |
| 261 const content::NotificationDetails& details) OVERRIDE; | 261 const content::NotificationDetails& details) override; |
| 262 | 262 |
| 263 // Removes all |user_id| related wallpaper info and saved wallpapers. | 263 // Removes all |user_id| related wallpaper info and saved wallpapers. |
| 264 void RemoveUserWallpaperInfo(const std::string& user_id); | 264 void RemoveUserWallpaperInfo(const std::string& user_id); |
| 265 | 265 |
| 266 // Calls SetCustomWallpaper() with |user_id_hash| received from cryptohome. | 266 // Calls SetCustomWallpaper() with |user_id_hash| received from cryptohome. |
| 267 void SetCustomWallpaperOnSanitizedUsername(const std::string& user_id, | 267 void SetCustomWallpaperOnSanitizedUsername(const std::string& user_id, |
| 268 const gfx::ImageSkia& image, | 268 const gfx::ImageSkia& image, |
| 269 bool update_wallpaper, | 269 bool update_wallpaper, |
| 270 bool cryptohome_success, | 270 bool cryptohome_success, |
| 271 const std::string& user_id_hash); | 271 const std::string& user_id_hash); |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 scoped_ptr<user_manager::UserImage> default_wallpaper_image_; | 623 scoped_ptr<user_manager::UserImage> default_wallpaper_image_; |
| 624 | 624 |
| 625 base::WeakPtrFactory<WallpaperManager> weak_factory_; | 625 base::WeakPtrFactory<WallpaperManager> weak_factory_; |
| 626 | 626 |
| 627 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); | 627 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); |
| 628 }; | 628 }; |
| 629 | 629 |
| 630 } // namespace chromeos | 630 } // namespace chromeos |
| 631 | 631 |
| 632 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_ | 632 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_WALLPAPER_WALLPAPER_MANAGER_H_ |
| OLD | NEW |