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

Unified Diff: components/user_manager/user_manager.h

Issue 2568973002: chromeos: Replace user image notifications with observer (Closed)
Patch Set: rebase Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/settings/profile_info_handler.cc ('k') | components/user_manager/user_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_manager/user_manager.h
diff --git a/components/user_manager/user_manager.h b/components/user_manager/user_manager.h
index 8104d7615bfb7d886c265451484cde2b3bb16ab5..fbf4cc185bf66865199b23ff1c50a531d5b03759 100644
--- a/components/user_manager/user_manager.h
+++ b/components/user_manager/user_manager.h
@@ -39,6 +39,18 @@ class USER_MANAGER_EXPORT UserManager {
// Called when the local state preferences is changed.
virtual void LocalStateChanged(UserManager* user_manager);
+ // Called when the image of the given user is changed.
+ virtual void OnUserImageChanged(const User& user);
+
+ // Called when the profile image download for the given user fails or
+ // user has the default profile image or no porfile image at all.
+ virtual void OnUserProfileImageUpdateFailed(const User& user);
+
+ // Called when the profile image for the given user is downloaded.
+ // |profile_image| contains the downloaded profile image.
+ virtual void OnUserProfileImageUpdated(const User& user,
+ const gfx::ImageSkia& profile_image);
+
protected:
virtual ~Observer();
};
@@ -300,6 +312,11 @@ class USER_MANAGER_EXPORT UserManager {
virtual void RemoveSessionStateObserver(UserSessionStateObserver* obs) = 0;
virtual void NotifyLocalStateChanged() = 0;
+ virtual void NotifyUserImageChanged(const User& user) = 0;
+ virtual void NotifyUserProfileImageUpdateFailed(const User& user) = 0;
+ virtual void NotifyUserProfileImageUpdated(
+ const User& user,
+ const gfx::ImageSkia& profile_image) = 0;
// Changes the child status and notifies observers.
virtual void ChangeUserChildStatus(User* user, bool is_child) = 0;
« no previous file with comments | « chrome/browser/ui/webui/settings/profile_info_handler.cc ('k') | components/user_manager/user_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698