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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 WallpaperManager(); | 39 WallpaperManager(); |
40 | 40 |
41 // Registers wallpaper manager preferences. | 41 // Registers wallpaper manager preferences. |
42 static void RegisterPrefs(PrefService* local_state); | 42 static void RegisterPrefs(PrefService* local_state); |
43 | 43 |
44 // Adds PowerManagerClient and TimeZoneSettings observers. It needs to be | 44 // Adds PowerManagerClient and TimeZoneSettings observers. It needs to be |
45 // added after PowerManagerClient initialized. | 45 // added after PowerManagerClient initialized. |
46 void AddObservers(); | 46 void AddObservers(); |
47 | 47 |
48 // Caches |email|'s wallpaper to memory if it is custom wallpaper. | 48 // Caches |email|'s wallpaper to memory. |
49 void CacheIfCustomWallpaper(const std::string& email); | 49 void CacheUserWallpaper(const std::string& email); |
50 | 50 |
51 // Loads wallpaper asynchronously if the current wallpaper is not the | 51 // Loads wallpaper asynchronously if the current wallpaper is not the |
52 // wallpaper of logged in user. | 52 // wallpaper of logged in user. |
53 void EnsureLoggedInUserWallpaperLoaded(); | 53 void EnsureLoggedInUserWallpaperLoaded(); |
54 | 54 |
55 // Fetches |email|'s wallpaper from local disk. | 55 // Fetches |email|'s wallpaper from local disk. |
56 void FetchCustomWallpaper(const std::string& email); | 56 void FetchCustomWallpaper(const std::string& email); |
57 | 57 |
58 // Gets encoded custom wallpaper from cache. Returns true if success. | 58 // Gets encoded custom wallpaper from cache. Returns true if success. |
59 bool GetCustomWallpaperFromCache(const std::string& email, | 59 bool GetCustomWallpaperFromCache(const std::string& email, |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 content::NotificationRegistrar registrar_; | 205 content::NotificationRegistrar registrar_; |
206 | 206 |
207 base::OneShotTimer<WallpaperManager> timer_; | 207 base::OneShotTimer<WallpaperManager> timer_; |
208 | 208 |
209 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); | 209 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); |
210 }; | 210 }; |
211 | 211 |
212 } // namespace chromeos | 212 } // namespace chromeos |
213 | 213 |
214 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ | 214 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ |
OLD | NEW |