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

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: Add user wallpaper for first time logged in user and ephemeral users 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 RemoveUser(const std::string& email, 51 virtual void RemoveUser(const std::string& email,
51 RemoveUserDelegate* delegate) OVERRIDE; 52 RemoveUserDelegate* delegate) OVERRIDE;
52 virtual void RemoveUserFromList(const std::string& email) OVERRIDE; 53 virtual void RemoveUserFromList(const std::string& email) OVERRIDE;
53 virtual bool IsKnownUser(const std::string& email) const OVERRIDE; 54 virtual bool IsKnownUser(const std::string& email) const OVERRIDE;
54 virtual const User* FindUser(const std::string& email) const OVERRIDE; 55 virtual const User* FindUser(const std::string& email) const OVERRIDE;
55 virtual const User& GetLoggedInUser() const OVERRIDE; 56 virtual const User& GetLoggedInUser() const OVERRIDE;
56 virtual User& GetLoggedInUser() OVERRIDE; 57 virtual User& GetLoggedInUser() OVERRIDE;
57 virtual bool IsDisplayNameUnique( 58 virtual bool IsDisplayNameUnique(
58 const std::string& display_name) const OVERRIDE; 59 const std::string& display_name) const OVERRIDE;
59 virtual void SaveUserOAuthStatus( 60 virtual void SaveUserOAuthStatus(
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 bool AreEphemeralUsersEnabled() const; 120 bool AreEphemeralUsersEnabled() const;
120 121
121 // Returns true if the user with the given email address is to be treated as 122 // Returns true if the user with the given email address is to be treated as
122 // ephemeral. 123 // ephemeral.
123 bool IsEphemeralUser(const std::string& email) const; 124 bool IsEphemeralUser(const std::string& email) const;
124 125
125 // Returns the user with the given email address if found in the persistent 126 // Returns the user with the given email address if found in the persistent
126 // list. Returns |NULL| otherwise. 127 // list. Returns |NULL| otherwise.
127 const User* FindUserInList(const std::string& email) const; 128 const User* FindUserInList(const std::string& email) const;
128 129
130 int FindUserWallpaperIndex(const std::string& email);
131
129 // Makes stub user the current logged-in user (for test paths). 132 // Makes stub user the current logged-in user (for test paths).
130 void StubUserLoggedIn(); 133 void StubUserLoggedIn();
131 134
132 // Notifies on new user session. 135 // Notifies on new user session.
133 void NotifyOnLogin(); 136 void NotifyOnLogin();
134 137
135 // Reads user's oauth token status from local state preferences. 138 // Reads user's oauth token status from local state preferences.
136 User::OAuthTokenStatus LoadUserOAuthStatus(const std::string& username) const; 139 User::OAuthTokenStatus LoadUserOAuthStatus(const std::string& username) const;
137 140
138 void SetCurrentUserIsOwner(bool is_current_user_owner); 141 void SetCurrentUserIsOwner(bool is_current_user_owner);
139 142
140 // Sets one of the default images for the specified user and saves this 143 // Sets one of the default images for the specified user and saves this
141 // setting in local state. 144 // setting in local state.
142 // Does not send LOGIN_USER_IMAGE_CHANGED notification. 145 // Does not send LOGIN_USER_IMAGE_CHANGED notification.
143 void SetInitialUserImage(const std::string& username); 146 void SetInitialUserImage(const std::string& username);
144 147
148 // Sets one of the default wallpapers for the specified user and saves this
149 // settings in local state.
150 void SetInitialUserWallpaper(const std::string& username);
151
145 // Sets image for user |username| and sends LOGIN_USER_IMAGE_CHANGED 152 // Sets image for user |username| and sends LOGIN_USER_IMAGE_CHANGED
146 // notification unless this is a new user and image is set for the first time. 153 // notification unless this is a new user and image is set for the first time.
147 // If |image| is empty, sets a stub image for the user. 154 // If |image| is empty, sets a stub image for the user.
148 void SetUserImage(const std::string& username, 155 void SetUserImage(const std::string& username,
149 int image_index, 156 int image_index,
150 const SkBitmap& image); 157 const SkBitmap& image);
151 158
152 // Saves image to file, updates local state preferences to given image index 159 // Saves image to file, updates local state preferences to given image index
153 // and sends LOGIN_USER_IMAGE_CHANGED notification. 160 // and sends LOGIN_USER_IMAGE_CHANGED notification.
154 void SaveUserImageInternal(const std::string& username, 161 void SaveUserImageInternal(const std::string& username,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 280
274 // Data URL for |downloaded_profile_image_|. 281 // Data URL for |downloaded_profile_image_|.
275 std::string downloaded_profile_image_data_url_; 282 std::string downloaded_profile_image_data_url_;
276 283
277 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); 284 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl);
278 }; 285 };
279 286
280 } // namespace chromeos 287 } // namespace chromeos
281 288
282 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 289 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698