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

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: Created 8 years, 5 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 bool has_animated_image() const { return user_image_.has_animated_image(); } 73 bool has_animated_image() const { return user_image_.has_animated_image(); }
74 // Returns raw representation of animated user image. 74 // Returns raw representation of animated user image.
75 const UserImage::RawImage& animated_image() const { 75 const UserImage::RawImage& animated_image() const {
76 return user_image_.animated_image(); 76 return user_image_.animated_image();
77 } 77 }
78 78
79 // Returns the URL of user image, if there is any. Currently only the profile 79 // Returns the URL of user image, if there is any. Currently only the profile
80 // image has a URL, for other images empty URL is returned. 80 // image has a URL, for other images empty URL is returned.
81 GURL image_url() const { return user_image_.url(); } 81 GURL image_url() const { return user_image_.url(); }
82 82
83 // The thumbnail of user custom wallpaper.
84 const SkBitmap& wallpaper_thumbnail() const { return wallpaper_thumbnail_; }
85
86 // True if user image is a stub (while real image is being loaded from file). 83 // True if user image is a stub (while real image is being loaded from file).
87 bool image_is_stub() const { return image_is_stub_; } 84 bool image_is_stub() const { return image_is_stub_; }
88 85
89 // OAuth token status for this user. 86 // OAuth token status for this user.
90 OAuthTokenStatus oauth_token_status() const { return oauth_token_status_; } 87 OAuthTokenStatus oauth_token_status() const { return oauth_token_status_; }
91 88
92 // The displayed user name. 89 // The displayed user name.
93 string16 display_name() const { return display_name_; } 90 string16 display_name() const { return display_name_; }
94 91
95 // The displayed (non-canonical) user email. 92 // The displayed (non-canonical) user email.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 void set_display_email(const std::string& display_email) { 127 void set_display_email(const std::string& display_email) {
131 display_email_ = display_email; 128 display_email_ = display_email;
132 } 129 }
133 130
134 std::string email_; 131 std::string email_;
135 string16 display_name_; 132 string16 display_name_;
136 // The displayed user email, defaults to |email_|. 133 // The displayed user email, defaults to |email_|.
137 std::string display_email_; 134 std::string display_email_;
138 UserImage user_image_; 135 UserImage user_image_;
139 OAuthTokenStatus oauth_token_status_; 136 OAuthTokenStatus oauth_token_status_;
140 SkBitmap wallpaper_thumbnail_;
141 137
142 // Either index of a default image for the user, |kExternalImageIndex| or 138 // Either index of a default image for the user, |kExternalImageIndex| or
143 // |kProfileImageIndex|. 139 // |kProfileImageIndex|.
144 int image_index_; 140 int image_index_;
145 141
146 // True if current user image is a stub set by a |SetStubImage| call. 142 // True if current user image is a stub set by a |SetStubImage| call.
147 bool image_is_stub_; 143 bool image_is_stub_;
148 144
149 DISALLOW_COPY_AND_ASSIGN(User); 145 DISALLOW_COPY_AND_ASSIGN(User);
150 }; 146 };
151 147
152 // List of known users. 148 // List of known users.
153 typedef std::vector<User*> UserList; 149 typedef std::vector<User*> UserList;
154 150
155 } // namespace chromeos 151 } // namespace chromeos
156 152
157 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_ 153 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698