OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_USER_MANAGER_USER_H_ | 5 #ifndef COMPONENTS_USER_MANAGER_USER_H_ |
6 #define COMPONENTS_USER_MANAGER_USER_H_ | 6 #define COMPONENTS_USER_MANAGER_USER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 // True if user image can be synced. | 95 // True if user image can be synced. |
96 virtual bool CanSyncImage() const; | 96 virtual bool CanSyncImage() const; |
97 | 97 |
98 int image_index() const { return image_index_; } | 98 int image_index() const { return image_index_; } |
99 bool has_raw_image() const { return user_image_.has_raw_image(); } | 99 bool has_raw_image() const { return user_image_.has_raw_image(); } |
100 // Returns raw representation of static user image. | 100 // Returns raw representation of static user image. |
101 const UserImage::RawImage& raw_image() const { | 101 const UserImage::RawImage& raw_image() const { |
102 return user_image_.raw_image(); | 102 return user_image_.raw_image(); |
103 } | 103 } |
104 bool has_animated_image() const { return user_image_.has_animated_image(); } | |
105 // Returns raw representation of animated user image. | |
106 const UserImage::RawImage& animated_image() const { | |
107 return user_image_.animated_image(); | |
108 } | |
109 | 104 |
110 // Whether |raw_image| contains data in format that is considered safe to | 105 // Whether |raw_image| contains data in format that is considered safe to |
111 // decode in sensitive environment (on Login screen). | 106 // decode in sensitive environment (on Login screen). |
112 bool image_is_safe_format() const { return user_image_.is_safe_format(); } | 107 bool image_is_safe_format() const { return user_image_.is_safe_format(); } |
113 | 108 |
114 // Returns the URL of user image, if there is any. Currently only the profile | 109 // Returns the URL of user image, if there is any. Currently only the profile |
115 // image has a URL, for other images empty URL is returned. | 110 // image has a URL, for other images empty URL is returned. |
116 GURL image_url() const { return user_image_.url(); } | 111 GURL image_url() const { return user_image_.url(); } |
117 | 112 |
118 // True if user image is a stub (while real image is being loaded from file). | 113 // True if user image is a stub (while real image is being loaded from file). |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 260 |
266 DISALLOW_COPY_AND_ASSIGN(User); | 261 DISALLOW_COPY_AND_ASSIGN(User); |
267 }; | 262 }; |
268 | 263 |
269 // List of known users. | 264 // List of known users. |
270 typedef std::vector<User*> UserList; | 265 typedef std::vector<User*> UserList; |
271 | 266 |
272 } // namespace user_manager | 267 } // namespace user_manager |
273 | 268 |
274 #endif // COMPONENTS_USER_MANAGER_USER_H_ | 269 #endif // COMPONENTS_USER_MANAGER_USER_H_ |
OLD | NEW |