| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 // Updates current wallpaper. It may switch the size of wallpaper based on the | 281 // Updates current wallpaper. It may switch the size of wallpaper based on the |
| 282 // current display's resolution. (asynchronously with zero delay) | 282 // current display's resolution. (asynchronously with zero delay) |
| 283 void UpdateWallpaper(); | 283 void UpdateWallpaper(); |
| 284 | 284 |
| 285 // Adds given observer to the list. | 285 // Adds given observer to the list. |
| 286 void AddObserver(Observer* observer); | 286 void AddObserver(Observer* observer); |
| 287 | 287 |
| 288 // Removes given observer from the list. | 288 // Removes given observer from the list. |
| 289 void RemoveObserver(Observer* observer); | 289 void RemoveObserver(Observer* observer); |
| 290 | 290 |
| 291 // Enable surprise me wallpaper mode. |
| 292 void EnableSurpriseMe(); |
| 293 |
| 291 private: | 294 private: |
| 292 friend class TestApi; | 295 friend class TestApi; |
| 293 friend class WallpaperManagerBrowserTest; | 296 friend class WallpaperManagerBrowserTest; |
| 294 typedef std::map<std::string, gfx::ImageSkia> CustomWallpaperMap; | 297 typedef std::map<std::string, gfx::ImageSkia> CustomWallpaperMap; |
| 295 | 298 |
| 296 // Gets encoded wallpaper from cache. Returns true if success. | 299 // Gets encoded wallpaper from cache. Returns true if success. |
| 297 bool GetWallpaperFromCache(const std::string& user_id, | 300 bool GetWallpaperFromCache(const std::string& user_id, |
| 298 gfx::ImageSkia* wallpaper); | 301 gfx::ImageSkia* wallpaper); |
| 299 | 302 |
| 300 // The number of wallpapers have loaded. For test only. | 303 // The number of wallpapers have loaded. For test only. |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 // All pending will be finally deleted on destroy. | 498 // All pending will be finally deleted on destroy. |
| 496 typedef std::vector<scoped_refptr<PendingWallpaper> > PendingList; | 499 typedef std::vector<scoped_refptr<PendingWallpaper> > PendingList; |
| 497 PendingList loading_; | 500 PendingList loading_; |
| 498 | 501 |
| 499 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); | 502 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); |
| 500 }; | 503 }; |
| 501 | 504 |
| 502 } // namespace chromeos | 505 } // namespace chromeos |
| 503 | 506 |
| 504 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ | 507 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ |
| OLD | NEW |