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

Unified Diff: chrome/browser/chromeos/login/user_manager.h

Issue 7523063: Add a hook for capturing a user profile photo and saving it to file and local state. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebased Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/take_photo_view.cc ('k') | chrome/browser/chromeos/login/user_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user_manager.h
diff --git a/chrome/browser/chromeos/login/user_manager.h b/chrome/browser/chromeos/login/user_manager.h
index c244a4dc7bdc47bb0ab419e56196af95d645b08d..d6c64a129bddf70fd3a72b5106fe55afe595f657 100644
--- a/chrome/browser/chromeos/login/user_manager.h
+++ b/chrome/browser/chromeos/login/user_manager.h
@@ -12,6 +12,7 @@
#include "base/basictypes.h"
#include "base/hash_tables.h"
#include "base/memory/ref_counted.h"
+#include "base/observer_list.h"
#include "base/synchronization/lock.h"
#include "chrome/browser/chromeos/login/user_image_loader.h"
#include "content/common/notification_observer.h"
@@ -162,6 +163,22 @@ class UserManager : public UserImageLoader::Delegate,
// Returns true if we're logged in as a Guest.
bool IsLoggedInAsGuest() const;
+ // Interface that observers of UserManager must implement in order
+ // to receive notification when local state preferences is changed
+ class Observer {
+ public:
+ // Called when the local state preferences is changed
+ virtual void LocalStateChanged(UserManager* user_manager) = 0;
+
+ protected:
+ virtual ~Observer() {}
+ };
+
+ void AddObserver(Observer* obs);
+ void RemoveObserver(Observer* obs);
+
+ void NotifyLocalStateChanged();
+
protected:
UserManager();
virtual ~UserManager();
@@ -203,6 +220,8 @@ class UserManager : public UserImageLoader::Delegate,
friend struct base::DefaultLazyInstanceTraits<UserManager>;
+ ObserverList<Observer> observer_list_;
+
DISALLOW_COPY_AND_ASSIGN(UserManager);
};
« no previous file with comments | « chrome/browser/chromeos/login/take_photo_view.cc ('k') | chrome/browser/chromeos/login/user_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698