Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: components/user_manager/user.h

Issue 2537713002: Add support for transparent/translucent pixels in the user image (Closed)
Patch Set: rebased Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/user_manager/DEPS ('k') | components/user_manager/user_image/user_image.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 // Whether the user has a default image. 132 // Whether the user has a default image.
133 bool HasDefaultImage() const; 133 bool HasDefaultImage() const;
134 134
135 int image_index() const { return image_index_; } 135 int image_index() const { return image_index_; }
136 bool has_image_bytes() const { return user_image_->has_image_bytes(); } 136 bool has_image_bytes() const { return user_image_->has_image_bytes(); }
137 // Returns bytes representation of static user image for WebUI. 137 // Returns bytes representation of static user image for WebUI.
138 scoped_refptr<base::RefCountedBytes> image_bytes() const { 138 scoped_refptr<base::RefCountedBytes> image_bytes() const {
139 return user_image_->image_bytes(); 139 return user_image_->image_bytes();
140 } 140 }
141 // Returns image format of the bytes representation of static user image
142 // for WebUI.
143 UserImage::ImageFormat image_format() const {
144 return user_image_->image_format();
145 }
141 146
142 // Whether |user_image_| contains data in format that is considered safe to 147 // Whether |user_image_| contains data in format that is considered safe to
143 // decode in sensitive environment (on Login screen). 148 // decode in sensitive environment (on Login screen).
144 bool image_is_safe_format() const { return user_image_->is_safe_format(); } 149 bool image_is_safe_format() const { return user_image_->is_safe_format(); }
145 150
146 // Returns the URL of user image, if there is any. Currently only the profile 151 // Returns the URL of user image, if there is any. Currently only the profile
147 // image has a URL, for other images empty URL is returned. 152 // image has a URL, for other images empty URL is returned.
148 GURL image_url() const { return user_image_->url(); } 153 GURL image_url() const { return user_image_->url(); }
149 154
150 // True if user image is a stub (while real image is being loaded from file). 155 // True if user image is a stub (while real image is being loaded from file).
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 307
303 DISALLOW_COPY_AND_ASSIGN(User); 308 DISALLOW_COPY_AND_ASSIGN(User);
304 }; 309 };
305 310
306 // List of known users. 311 // List of known users.
307 using UserList = std::vector<User*>; 312 using UserList = std::vector<User*>;
308 313
309 } // namespace user_manager 314 } // namespace user_manager
310 315
311 #endif // COMPONENTS_USER_MANAGER_USER_H_ 316 #endif // COMPONENTS_USER_MANAGER_USER_H_
OLDNEW
« no previous file with comments | « components/user_manager/DEPS ('k') | components/user_manager/user_image/user_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698