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

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

Issue 10207030: Asynchronously load wallpapers when user pod is selected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 8 years, 7 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_MANAGER_IMPL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 29 matching lines...) Expand all
40 public content::NotificationObserver { 40 public content::NotificationObserver {
41 public: 41 public:
42 // UserManager implementation: 42 // UserManager implementation:
43 virtual ~UserManagerImpl(); 43 virtual ~UserManagerImpl();
44 44
45 virtual const UserList& GetUsers() const OVERRIDE; 45 virtual const UserList& GetUsers() const OVERRIDE;
46 virtual void UserLoggedIn(const std::string& email) OVERRIDE; 46 virtual void UserLoggedIn(const std::string& email) OVERRIDE;
47 virtual void DemoUserLoggedIn() OVERRIDE; 47 virtual void DemoUserLoggedIn() OVERRIDE;
48 virtual void GuestUserLoggedIn() OVERRIDE; 48 virtual void GuestUserLoggedIn() OVERRIDE;
49 virtual void EphemeralUserLoggedIn(const std::string& email) OVERRIDE; 49 virtual void EphemeralUserLoggedIn(const std::string& email) OVERRIDE;
50 virtual void UserSelected(const std::string& email) OVERRIDE;
50 virtual void SessionStarted() OVERRIDE; 51 virtual void SessionStarted() OVERRIDE;
51 virtual void RemoveUser(const std::string& email, 52 virtual void RemoveUser(const std::string& email,
52 RemoveUserDelegate* delegate) OVERRIDE; 53 RemoveUserDelegate* delegate) OVERRIDE;
53 virtual void RemoveUserFromList(const std::string& email) OVERRIDE; 54 virtual void RemoveUserFromList(const std::string& email) OVERRIDE;
54 virtual bool IsKnownUser(const std::string& email) const OVERRIDE; 55 virtual bool IsKnownUser(const std::string& email) const OVERRIDE;
55 virtual const User* FindUser(const std::string& email) const OVERRIDE; 56 virtual const User* FindUser(const std::string& email) const OVERRIDE;
56 virtual const User& GetLoggedInUser() const OVERRIDE; 57 virtual const User& GetLoggedInUser() const OVERRIDE;
57 virtual User& GetLoggedInUser() OVERRIDE; 58 virtual User& GetLoggedInUser() OVERRIDE;
58 virtual bool IsDisplayNameUnique( 59 virtual bool IsDisplayNameUnique(
59 const std::string& display_name) const OVERRIDE; 60 const std::string& display_name) const OVERRIDE;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 bool AreEphemeralUsersEnabled() const; 122 bool AreEphemeralUsersEnabled() const;
122 123
123 // Returns true if the user with the given email address is to be treated as 124 // Returns true if the user with the given email address is to be treated as
124 // ephemeral. 125 // ephemeral.
125 bool IsEphemeralUser(const std::string& email) const; 126 bool IsEphemeralUser(const std::string& email) const;
126 127
127 // Returns the user with the given email address if found in the persistent 128 // Returns the user with the given email address if found in the persistent
128 // list. Returns |NULL| otherwise. 129 // list. Returns |NULL| otherwise.
129 const User* FindUserInList(const std::string& email) const; 130 const User* FindUserInList(const std::string& email) const;
130 131
132 int FindUserWallpaperIndex(const std::string& email);
133
131 // Makes stub user the current logged-in user (for test paths). 134 // Makes stub user the current logged-in user (for test paths).
132 void StubUserLoggedIn(); 135 void StubUserLoggedIn();
133 136
134 // Notifies on new user session. 137 // Notifies on new user session.
135 void NotifyOnLogin(); 138 void NotifyOnLogin();
136 139
137 // Reads user's oauth token status from local state preferences. 140 // Reads user's oauth token status from local state preferences.
138 User::OAuthTokenStatus LoadUserOAuthStatus(const std::string& username) const; 141 User::OAuthTokenStatus LoadUserOAuthStatus(const std::string& username) const;
139 142
140 void SetCurrentUserIsOwner(bool is_current_user_owner); 143 void SetCurrentUserIsOwner(bool is_current_user_owner);
141 144
142 // Sets one of the default images for the specified user and saves this 145 // Sets one of the default images for the specified user and saves this
143 // setting in local state. 146 // setting in local state.
144 // Does not send LOGIN_USER_IMAGE_CHANGED notification. 147 // Does not send LOGIN_USER_IMAGE_CHANGED notification.
145 void SetInitialUserImage(const std::string& username); 148 void SetInitialUserImage(const std::string& username);
146 149
150 // Sets one of the default wallpapers for the specified user and saves this
151 // settings in local state.
152 void SetInitialUserWallpaper(const std::string& username);
153
147 // Sets image for user |username| and sends LOGIN_USER_IMAGE_CHANGED 154 // Sets image for user |username| and sends LOGIN_USER_IMAGE_CHANGED
148 // notification unless this is a new user and image is set for the first time. 155 // notification unless this is a new user and image is set for the first time.
149 // If |image| is empty, sets a stub image for the user. 156 // If |image| is empty, sets a stub image for the user.
150 void SetUserImage(const std::string& username, 157 void SetUserImage(const std::string& username,
151 int image_index, 158 int image_index,
152 const SkBitmap& image); 159 const SkBitmap& image);
153 160
154 // Saves image to file, updates local state preferences to given image index 161 // Saves image to file, updates local state preferences to given image index
155 // and sends LOGIN_USER_IMAGE_CHANGED notification. 162 // and sends LOGIN_USER_IMAGE_CHANGED notification.
156 void SaveUserImageInternal(const std::string& username, 163 void SaveUserImageInternal(const std::string& username,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 285
279 // Data URL for |downloaded_profile_image_|. 286 // Data URL for |downloaded_profile_image_|.
280 std::string downloaded_profile_image_data_url_; 287 std::string downloaded_profile_image_data_url_;
281 288
282 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); 289 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl);
283 }; 290 };
284 291
285 } // namespace chromeos 292 } // namespace chromeos
286 293
287 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 294 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_manager.h ('k') | chrome/browser/chromeos/login/user_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698