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

Side by Side Diff: chrome/browser/chromeos/login/user.h

Issue 10832019: Speed up custom wallpaper switching time and wallpaper manager code refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 years, 4 months 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 | Annotate | Revision Log
OLDNEW
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_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_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
79 bool has_animated_image() const { return user_image_.has_animated_image(); } 79 bool has_animated_image() const { return user_image_.has_animated_image(); }
80 // Returns raw representation of animated user image. 80 // Returns raw representation of animated user image.
81 const UserImage::RawImage& animated_image() const { 81 const UserImage::RawImage& animated_image() const {
82 return user_image_.animated_image(); 82 return user_image_.animated_image();
83 } 83 }
84 84
85 // Returns the URL of user image, if there is any. Currently only the profile 85 // Returns the URL of user image, if there is any. Currently only the profile
86 // image has a URL, for other images empty URL is returned. 86 // image has a URL, for other images empty URL is returned.
87 GURL image_url() const { return user_image_.url(); } 87 GURL image_url() const { return user_image_.url(); }
88 88
89 // The thumbnail of user custom wallpaper.
90 const SkBitmap& wallpaper_thumbnail() const { return wallpaper_thumbnail_; }
91
92 // True if user image is a stub (while real image is being loaded from file). 89 // True if user image is a stub (while real image is being loaded from file).
93 bool image_is_stub() const { return image_is_stub_; } 90 bool image_is_stub() const { return image_is_stub_; }
94 91
95 // OAuth token status for this user. 92 // OAuth token status for this user.
96 OAuthTokenStatus oauth_token_status() const { return oauth_token_status_; } 93 OAuthTokenStatus oauth_token_status() const { return oauth_token_status_; }
97 94
98 // The displayed user name. 95 // The displayed user name.
99 string16 display_name() const { return display_name_; } 96 string16 display_name() const { return display_name_; }
100 97
101 // The displayed (non-canonical) user email. 98 // The displayed (non-canonical) user email.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 void set_display_email(const std::string& display_email) { 133 void set_display_email(const std::string& display_email) {
137 display_email_ = display_email; 134 display_email_ = display_email;
138 } 135 }
139 136
140 std::string email_; 137 std::string email_;
141 string16 display_name_; 138 string16 display_name_;
142 // The displayed user email, defaults to |email_|. 139 // The displayed user email, defaults to |email_|.
143 std::string display_email_; 140 std::string display_email_;
144 UserImage user_image_; 141 UserImage user_image_;
145 OAuthTokenStatus oauth_token_status_; 142 OAuthTokenStatus oauth_token_status_;
146 SkBitmap wallpaper_thumbnail_;
147 143
148 // Either index of a default image for the user, |kExternalImageIndex| or 144 // Either index of a default image for the user, |kExternalImageIndex| or
149 // |kProfileImageIndex|. 145 // |kProfileImageIndex|.
150 int image_index_; 146 int image_index_;
151 147
152 // True if current user image is a stub set by a |SetStubImage| call. 148 // True if current user image is a stub set by a |SetStubImage| call.
153 bool image_is_stub_; 149 bool image_is_stub_;
154 150
155 DISALLOW_COPY_AND_ASSIGN(User); 151 DISALLOW_COPY_AND_ASSIGN(User);
156 }; 152 };
157 153
158 // List of known users. 154 // List of known users.
159 typedef std::vector<User*> UserList; 155 typedef std::vector<User*> UserList;
160 156
161 } // namespace chromeos 157 } // namespace chromeos
162 158
163 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_ 159 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698