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_USER_IMAGE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/chromeos/login/user.h" | 10 #include "chrome/browser/chromeos/login/user.h" |
11 | 11 |
12 class FilePath; | 12 class FilePath; |
13 class PrefServiceSimple; | 13 class PrefRegistrySimple; |
14 | 14 |
15 namespace gfx { | 15 namespace gfx { |
16 class ImageSkia; | 16 class ImageSkia; |
17 } | 17 } |
18 | 18 |
19 namespace chromeos { | 19 namespace chromeos { |
20 | 20 |
21 class UserImage; | 21 class UserImage; |
22 | 22 |
23 // Base class that provides a mechanism for updating user images. | 23 // Base class that provides a mechanism for updating user images. |
24 class UserImageManager { | 24 class UserImageManager { |
25 public: | 25 public: |
26 // Registers user image manager preferences. | 26 // Registers user image manager preferences. |
27 static void RegisterPrefs(PrefServiceSimple* local_state); | 27 static void RegisterPrefs(PrefRegistrySimple* local_state); |
28 | 28 |
29 virtual ~UserImageManager(); | 29 virtual ~UserImageManager(); |
30 | 30 |
31 // Loads user image data from Local State. | 31 // Loads user image data from Local State. |
32 virtual void LoadUserImages(const UserList& users) = 0; | 32 virtual void LoadUserImages(const UserList& users) = 0; |
33 | 33 |
34 // Indicates that a user with the given |email| has just logged in. | 34 // Indicates that a user with the given |email| has just logged in. |
35 virtual void UserLoggedIn(const std::string& email, | 35 virtual void UserLoggedIn(const std::string& email, |
36 bool user_is_new, | 36 bool user_is_new, |
37 bool user_is_local) = 0; | 37 bool user_is_local) = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 virtual void DownloadProfileImage(const std::string& reason) = 0; | 69 virtual void DownloadProfileImage(const std::string& reason) = 0; |
70 | 70 |
71 // Returns the result of the last successful profile image download, if any. | 71 // Returns the result of the last successful profile image download, if any. |
72 // Otherwise, returns an empty bitmap. | 72 // Otherwise, returns an empty bitmap. |
73 virtual const gfx::ImageSkia& DownloadedProfileImage() const = 0; | 73 virtual const gfx::ImageSkia& DownloadedProfileImage() const = 0; |
74 }; | 74 }; |
75 | 75 |
76 } // namespace chromeos | 76 } // namespace chromeos |
77 | 77 |
78 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_MANAGER_H_ | 78 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_MANAGER_H_ |
OLD | NEW |