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 CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 // True if user image can be synced. | 80 // True if user image can be synced. |
81 virtual bool CanSyncImage() const; | 81 virtual bool CanSyncImage() const; |
82 | 82 |
83 int image_index() const { return image_index_; } | 83 int image_index() const { return image_index_; } |
84 bool has_raw_image() const { return user_image_.has_raw_image(); } | 84 bool has_raw_image() const { return user_image_.has_raw_image(); } |
85 // Returns raw representation of static user image. | 85 // Returns raw representation of static user image. |
86 const user_manager::UserImage::RawImage& raw_image() const { | 86 const user_manager::UserImage::RawImage& raw_image() const { |
87 return user_image_.raw_image(); | 87 return user_image_.raw_image(); |
88 } | 88 } |
| 89 bool has_animated_image() const { return user_image_.has_animated_image(); } |
| 90 // Returns raw representation of animated user image. |
| 91 const user_manager::UserImage::RawImage& animated_image() const { |
| 92 return user_image_.animated_image(); |
| 93 } |
89 | 94 |
90 // Whether |raw_image| contains data in format that is considered safe to | 95 // Whether |raw_image| contains data in format that is considered safe to |
91 // decode in sensitive environment (on Login screen). | 96 // decode in sensitive environment (on Login screen). |
92 bool image_is_safe_format() const { return user_image_.is_safe_format(); } | 97 bool image_is_safe_format() const { return user_image_.is_safe_format(); } |
93 | 98 |
94 // Returns the URL of user image, if there is any. Currently only the profile | 99 // Returns the URL of user image, if there is any. Currently only the profile |
95 // image has a URL, for other images empty URL is returned. | 100 // image has a URL, for other images empty URL is returned. |
96 GURL image_url() const { return user_image_.url(); } | 101 GURL image_url() const { return user_image_.url(); } |
97 | 102 |
98 // True if user image is a stub (while real image is being loaded from file). | 103 // True if user image is a stub (while real image is being loaded from file). |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 260 |
256 DISALLOW_COPY_AND_ASSIGN(User); | 261 DISALLOW_COPY_AND_ASSIGN(User); |
257 }; | 262 }; |
258 | 263 |
259 // List of known users. | 264 // List of known users. |
260 typedef std::vector<User*> UserList; | 265 typedef std::vector<User*> UserList; |
261 | 266 |
262 } // namespace chromeos | 267 } // namespace chromeos |
263 | 268 |
264 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_H_ | 269 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_USER_H_ |
OLD | NEW |