| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 321 |
| 322 // Called when the policy-set wallpaper has been fetched. Initiates decoding | 322 // Called when the policy-set wallpaper has been fetched. Initiates decoding |
| 323 // of the JPEG |data| with a callback to SetPolicyControlledWallpaper(). | 323 // of the JPEG |data| with a callback to SetPolicyControlledWallpaper(). |
| 324 void OnPolicyFetched(const std::string& policy, | 324 void OnPolicyFetched(const std::string& policy, |
| 325 const std::string& user_id, | 325 const std::string& user_id, |
| 326 scoped_ptr<std::string> data); | 326 scoped_ptr<std::string> data); |
| 327 | 327 |
| 328 // Returns the appropriate wallpaper resolution for all root windows. | 328 // Returns the appropriate wallpaper resolution for all root windows. |
| 329 static WallpaperResolution GetAppropriateResolution(); | 329 static WallpaperResolution GetAppropriateResolution(); |
| 330 | 330 |
| 331 // Enable surprise me wallpaper mode. |
| 332 void EnableSurpriseMe(); |
| 333 |
| 331 private: | 334 private: |
| 332 friend class TestApi; | 335 friend class TestApi; |
| 333 friend class WallpaperManagerBrowserTest; | 336 friend class WallpaperManagerBrowserTest; |
| 334 friend class WallpaperManagerBrowserTestDefaultWallpaper; | 337 friend class WallpaperManagerBrowserTestDefaultWallpaper; |
| 335 friend class WallpaperManagerPolicyTest; | 338 friend class WallpaperManagerPolicyTest; |
| 336 | 339 |
| 337 typedef std::map<std::string, gfx::ImageSkia> CustomWallpaperMap; | 340 typedef std::map<std::string, gfx::ImageSkia> CustomWallpaperMap; |
| 338 | 341 |
| 339 // Set |wallpaper| controlled by policy. | 342 // Set |wallpaper| controlled by policy. |
| 340 void SetPolicyControlledWallpaper(const std::string& user_id, | 343 void SetPolicyControlledWallpaper(const std::string& user_id, |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 | 577 |
| 575 // Current decoded default image is stored in cache. | 578 // Current decoded default image is stored in cache. |
| 576 scoped_ptr<UserImage> default_wallpaper_image_; | 579 scoped_ptr<UserImage> default_wallpaper_image_; |
| 577 | 580 |
| 578 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); | 581 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); |
| 579 }; | 582 }; |
| 580 | 583 |
| 581 } // namespace chromeos | 584 } // namespace chromeos |
| 582 | 585 |
| 583 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ | 586 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ |
| OLD | NEW |