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 PrefService; | 13 class PrefServiceSimple; |
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(PrefService* local_state); | 27 static void RegisterPrefs(PrefServiceSimple* 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, bool user_is_new) = 0; | 35 virtual void UserLoggedIn(const std::string& email, bool user_is_new) = 0; |
36 | 36 |
37 // Sets user image to the default image with index |image_index|, sends | 37 // Sets user image to the default image with index |image_index|, sends |
(...skipping 29 matching lines...) Expand all Loading... |
67 virtual void DownloadProfileImage(const std::string& reason) = 0; | 67 virtual void DownloadProfileImage(const std::string& reason) = 0; |
68 | 68 |
69 // Returns the result of the last successful profile image download, if any. | 69 // Returns the result of the last successful profile image download, if any. |
70 // Otherwise, returns an empty bitmap. | 70 // Otherwise, returns an empty bitmap. |
71 virtual const gfx::ImageSkia& DownloadedProfileImage() const = 0; | 71 virtual const gfx::ImageSkia& DownloadedProfileImage() const = 0; |
72 }; | 72 }; |
73 | 73 |
74 } // namespace chromeos | 74 } // namespace chromeos |
75 | 75 |
76 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_MANAGER_H_ | 76 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_IMAGE_MANAGER_H_ |
OLD | NEW |