Index: chrome/browser/ui/webui/signin/user_manager_screen_handler.h |
diff --git a/chrome/browser/ui/webui/signin/user_manager_screen_handler.h b/chrome/browser/ui/webui/signin/user_manager_screen_handler.h |
index 1e7d1b625537c8d860b8a6111981b36ba935b3de..d23ba8e404277f6a5d82b423fd8ec2fd47fe6678 100644 |
--- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.h |
+++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.h |
@@ -11,9 +11,13 @@ |
#include "base/callback.h" |
#include "base/compiler_specific.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/memory/weak_ptr.h" |
+#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/profiles/profile_metrics.h" |
#include "chrome/browser/signin/screenlock_bridge.h" |
#include "chrome/browser/ui/host_desktop.h" |
+#include "content/public/browser/notification_observer.h" |
+#include "content/public/browser/notification_registrar.h" |
#include "content/public/browser/web_ui_message_handler.h" |
#include "google_apis/gaia/gaia_auth_consumer.h" |
@@ -27,7 +31,8 @@ class ListValue; |
class UserManagerScreenHandler : public content::WebUIMessageHandler, |
public ScreenlockBridge::LockHandler, |
- public GaiaAuthConsumer { |
+ public GaiaAuthConsumer, |
+ public content::NotificationObserver { |
public: |
UserManagerScreenHandler(); |
virtual ~UserManagerScreenHandler(); |
@@ -37,6 +42,11 @@ class UserManagerScreenHandler : public content::WebUIMessageHandler, |
void GetLocalizedValues(base::DictionaryValue* localized_strings); |
+ // content::NotificationObserver implementation: |
+ virtual void Observe(int type, |
+ const content::NotificationSource& source, |
+ const content::NotificationDetails& details) OVERRIDE; |
+ |
// ScreenlockBridge::LockHandler implementation. |
virtual void ShowBannerMessage(const base::string16& message) OVERRIDE; |
virtual void ShowUserPodCustomIcon( |
@@ -70,6 +80,9 @@ class UserManagerScreenHandler : public content::WebUIMessageHandler, |
virtual void OnClientLoginFailure(const GoogleServiceAuthError& error) |
OVERRIDE; |
+ // Handle when Notified of a NOTIFICATION_BROWSER_WINDOW_READY event. |
+ void OnBrowserWindowReady(Browser* browser); |
+ |
// Sends user list to account chooser. |
void SendUserList(); |
@@ -77,6 +90,10 @@ class UserManagerScreenHandler : public content::WebUIMessageHandler, |
void ReportAuthenticationResult(bool success, |
ProfileMetrics::ProfileAuth metric); |
+ // Perform cleanup once the profile and browser are open. |
+ void OnSwitchToProfileComplete(Profile* profile, |
+ Profile::CreateStatus profile_create_status); |
+ |
// Observes the ProfileInfoCache and gets notified when a profile has been |
// modified, so that the displayed user pods can be updated. |
scoped_ptr<ProfileUpdateObserver> profileInfoCacheObserver_; |
@@ -93,10 +110,17 @@ class UserManagerScreenHandler : public content::WebUIMessageHandler, |
// Login password, held during on-line auth for saving later if correct. |
std::string password_attempt_; |
+ // URL hash, used to key post-profile actions if present. |
+ std::string url_hash_; |
+ |
typedef std::map<std::string, ScreenlockBridge::LockHandler::AuthType> |
UserAuthTypeMap; |
UserAuthTypeMap user_auth_type_map_; |
+ base::WeakPtrFactory<UserManagerScreenHandler> weak_ptr_factory_; |
+ |
+ content::NotificationRegistrar registrar_; |
+ |
DISALLOW_COPY_AND_ASSIGN(UserManagerScreenHandler); |
}; |