OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/task/cancelable_task_tracker.h" | 16 #include "base/task/cancelable_task_tracker.h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/profiles/profile_metrics.h" | 18 #include "chrome/browser/profiles/profile_metrics.h" |
19 #include "chrome/browser/profiles/profile_statistics.h" | 19 #include "chrome/browser/profiles/profile_statistics.h" |
20 #include "chrome/browser/ui/host_desktop.h" | |
21 #include "components/proximity_auth/screenlock_bridge.h" | 20 #include "components/proximity_auth/screenlock_bridge.h" |
22 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
23 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
24 #include "content/public/browser/web_ui_message_handler.h" | 23 #include "content/public/browser/web_ui_message_handler.h" |
25 #include "google_apis/gaia/gaia_oauth_client.h" | 24 #include "google_apis/gaia/gaia_oauth_client.h" |
26 | 25 |
27 class AccountId; | 26 class AccountId; |
| 27 class Browser; |
28 class GaiaAuthFetcher; | 28 class GaiaAuthFetcher; |
29 | 29 |
30 namespace base { | 30 namespace base { |
31 class DictionaryValue; | 31 class DictionaryValue; |
32 class FilePath; | 32 class FilePath; |
33 class ListValue; | 33 class ListValue; |
34 } | 34 } |
35 | 35 |
36 class UserManagerScreenHandler | 36 class UserManagerScreenHandler |
37 : public content::WebUIMessageHandler, | 37 : public content::WebUIMessageHandler, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 ProfileMetrics::ProfileAuth metric); | 109 ProfileMetrics::ProfileAuth metric); |
110 | 110 |
111 // Perform cleanup once the profile and browser are open. | 111 // Perform cleanup once the profile and browser are open. |
112 void OnSwitchToProfileComplete(Profile* profile, | 112 void OnSwitchToProfileComplete(Profile* profile, |
113 Profile::CreateStatus profile_create_status); | 113 Profile::CreateStatus profile_create_status); |
114 | 114 |
115 // Observes the ProfileInfoCache and gets notified when a profile has been | 115 // Observes the ProfileInfoCache and gets notified when a profile has been |
116 // modified, so that the displayed user pods can be updated. | 116 // modified, so that the displayed user pods can be updated. |
117 scoped_ptr<ProfileUpdateObserver> profileInfoCacheObserver_; | 117 scoped_ptr<ProfileUpdateObserver> profileInfoCacheObserver_; |
118 | 118 |
119 // The host desktop type this user manager belongs to. | |
120 chrome::HostDesktopType desktop_type_; | |
121 | |
122 // Authenticator used when local-auth fails. | 119 // Authenticator used when local-auth fails. |
123 scoped_ptr<gaia::GaiaOAuthClient> oauth_client_; | 120 scoped_ptr<gaia::GaiaOAuthClient> oauth_client_; |
124 | 121 |
125 // The path of the profile currently being authenticated. | 122 // The path of the profile currently being authenticated. |
126 base::FilePath authenticating_profile_path_; | 123 base::FilePath authenticating_profile_path_; |
127 | 124 |
128 // Login email held during on-line auth for later use. | 125 // Login email held during on-line auth for later use. |
129 std::string email_address_; | 126 std::string email_address_; |
130 | 127 |
131 // URL hash, used to key post-profile actions if present. | 128 // URL hash, used to key post-profile actions if present. |
132 std::string url_hash_; | 129 std::string url_hash_; |
133 | 130 |
134 typedef std::map<std::string, | 131 typedef std::map<std::string, |
135 proximity_auth::ScreenlockBridge::LockHandler::AuthType> | 132 proximity_auth::ScreenlockBridge::LockHandler::AuthType> |
136 UserAuthTypeMap; | 133 UserAuthTypeMap; |
137 UserAuthTypeMap user_auth_type_map_; | 134 UserAuthTypeMap user_auth_type_map_; |
138 | 135 |
139 content::NotificationRegistrar registrar_; | 136 content::NotificationRegistrar registrar_; |
140 | 137 |
141 // The CancelableTaskTracker is currently used by GetProfileStatistics | 138 // The CancelableTaskTracker is currently used by GetProfileStatistics |
142 base::CancelableTaskTracker tracker_; | 139 base::CancelableTaskTracker tracker_; |
143 | 140 |
144 base::WeakPtrFactory<UserManagerScreenHandler> weak_ptr_factory_; | 141 base::WeakPtrFactory<UserManagerScreenHandler> weak_ptr_factory_; |
145 | 142 |
146 DISALLOW_COPY_AND_ASSIGN(UserManagerScreenHandler); | 143 DISALLOW_COPY_AND_ASSIGN(UserManagerScreenHandler); |
147 }; | 144 }; |
148 | 145 |
149 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ | 146 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ |
OLD | NEW |