| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 // Called when the wallpaper policy has been cleared for |user_id|. | 299 // Called when the wallpaper policy has been cleared for |user_id|. |
| 300 void OnPolicyCleared(const std::string& policy, const std::string& user_id); | 300 void OnPolicyCleared(const std::string& policy, const std::string& user_id); |
| 301 | 301 |
| 302 // Called when the policy-set wallpaper has been fetched. Initiates decoding | 302 // Called when the policy-set wallpaper has been fetched. Initiates decoding |
| 303 // of the JPEG |data| with a callback to SetPolicyControlledWallpaper(). | 303 // of the JPEG |data| with a callback to SetPolicyControlledWallpaper(). |
| 304 void OnPolicyFetched(const std::string& policy, | 304 void OnPolicyFetched(const std::string& policy, |
| 305 const std::string& user_id, | 305 const std::string& user_id, |
| 306 scoped_ptr<std::string> data); | 306 scoped_ptr<std::string> data); |
| 307 | 307 |
| 308 // Enable surprise me wallpaper mode. |
| 309 void EnableSurpriseMe(); |
| 310 |
| 308 private: | 311 private: |
| 309 friend class TestApi; | 312 friend class TestApi; |
| 310 friend class WallpaperManagerBrowserTest; | 313 friend class WallpaperManagerBrowserTest; |
| 311 friend class WallpaperManagerPolicyTest; | 314 friend class WallpaperManagerPolicyTest; |
| 312 | 315 |
| 313 typedef std::map<std::string, gfx::ImageSkia> CustomWallpaperMap; | 316 typedef std::map<std::string, gfx::ImageSkia> CustomWallpaperMap; |
| 314 | 317 |
| 315 // Set |wallpaper| controlled by policy. | 318 // Set |wallpaper| controlled by policy. |
| 316 void SetPolicyControlledWallpaper(const std::string& user_id, | 319 void SetPolicyControlledWallpaper(const std::string& user_id, |
| 317 const UserImage& wallpaper); | 320 const UserImage& wallpaper); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 // All pending will be finally deleted on destroy. | 522 // All pending will be finally deleted on destroy. |
| 520 typedef std::vector<scoped_refptr<PendingWallpaper> > PendingList; | 523 typedef std::vector<scoped_refptr<PendingWallpaper> > PendingList; |
| 521 PendingList loading_; | 524 PendingList loading_; |
| 522 | 525 |
| 523 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); | 526 DISALLOW_COPY_AND_ASSIGN(WallpaperManager); |
| 524 }; | 527 }; |
| 525 | 528 |
| 526 } // namespace chromeos | 529 } // namespace chromeos |
| 527 | 530 |
| 528 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ | 531 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WALLPAPER_MANAGER_H_ |
| OLD | NEW |