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

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

Powered by Google App Engine
This is Rietveld 408576698