OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 28 matching lines...) Expand all Loading... |
39 class DictionaryValue; | 39 class DictionaryValue; |
40 class ListValue; | 40 class ListValue; |
41 } | 41 } |
42 | 42 |
43 namespace chromeos { | 43 namespace chromeos { |
44 | 44 |
45 class AuthenticatedUserEmailRetriever; | 45 class AuthenticatedUserEmailRetriever; |
46 class CaptivePortalWindowProxy; | 46 class CaptivePortalWindowProxy; |
47 class CoreOobeActor; | 47 class CoreOobeActor; |
48 class GaiaScreenHandler; | 48 class GaiaScreenHandler; |
49 class LocallyManagedUserCreationScreenHandler; | |
50 class NativeWindowDelegate; | 49 class NativeWindowDelegate; |
| 50 class SupervisedUserCreationScreenHandler; |
51 class User; | 51 class User; |
52 class UserContext; | 52 class UserContext; |
53 | 53 |
54 // Helper class to pass initial parameters to the login screen. | 54 // Helper class to pass initial parameters to the login screen. |
55 class LoginScreenContext { | 55 class LoginScreenContext { |
56 public: | 56 public: |
57 LoginScreenContext(); | 57 LoginScreenContext(); |
58 explicit LoginScreenContext(const base::ListValue* args); | 58 explicit LoginScreenContext(const base::ListValue* args); |
59 | 59 |
60 void set_email(const std::string& email) { email_ = email; } | 60 void set_email(const std::string& email) { email_ = email; } |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 } | 239 } |
240 | 240 |
241 private: | 241 private: |
242 enum UIState { | 242 enum UIState { |
243 UI_STATE_UNKNOWN = 0, | 243 UI_STATE_UNKNOWN = 0, |
244 UI_STATE_GAIA_SIGNIN, | 244 UI_STATE_GAIA_SIGNIN, |
245 UI_STATE_ACCOUNT_PICKER, | 245 UI_STATE_ACCOUNT_PICKER, |
246 }; | 246 }; |
247 | 247 |
248 friend class GaiaScreenHandler; | 248 friend class GaiaScreenHandler; |
249 friend class LocallyManagedUserCreationScreenHandler; | |
250 friend class ReportDnsCacheClearedOnUIThread; | 249 friend class ReportDnsCacheClearedOnUIThread; |
| 250 friend class SupervisedUserCreationScreenHandler; |
251 | 251 |
252 void ShowImpl(); | 252 void ShowImpl(); |
253 | 253 |
254 // Updates current UI of the signin screen according to |ui_state| | 254 // Updates current UI of the signin screen according to |ui_state| |
255 // argument. Optionally it can pass screen initialization data via | 255 // argument. Optionally it can pass screen initialization data via |
256 // |params| argument. | 256 // |params| argument. |
257 void UpdateUIState(UIState ui_state, base::DictionaryValue* params); | 257 void UpdateUIState(UIState ui_state, base::DictionaryValue* params); |
258 | 258 |
259 void UpdateStateInternal(ErrorScreenActor::ErrorReason reason, | 259 void UpdateStateInternal(ErrorScreenActor::ErrorReason reason, |
260 bool force_update); | 260 bool force_update); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 void HandleLoginVisible(const std::string& source); | 344 void HandleLoginVisible(const std::string& source); |
345 void HandleCancelPasswordChangedFlow(); | 345 void HandleCancelPasswordChangedFlow(); |
346 void HandleCancelUserAdding(); | 346 void HandleCancelUserAdding(); |
347 void HandleMigrateUserData(const std::string& password); | 347 void HandleMigrateUserData(const std::string& password); |
348 void HandleResyncUserData(); | 348 void HandleResyncUserData(); |
349 void HandleLoginUIStateChanged(const std::string& source, bool new_value); | 349 void HandleLoginUIStateChanged(const std::string& source, bool new_value); |
350 void HandleUnlockOnLoginSuccess(); | 350 void HandleUnlockOnLoginSuccess(); |
351 void HandleLoginScreenUpdate(); | 351 void HandleLoginScreenUpdate(); |
352 void HandleShowLoadingTimeoutError(); | 352 void HandleShowLoadingTimeoutError(); |
353 void HandleUpdateOfflineLogin(bool offline_login_active); | 353 void HandleUpdateOfflineLogin(bool offline_login_active); |
354 void HandleShowLocallyManagedUserCreationScreen(); | 354 void HandleShowSupervisedUserCreationScreen(); |
355 void HandleFocusPod(const std::string& user_id); | 355 void HandleFocusPod(const std::string& user_id); |
356 void HandleLaunchKioskApp(const std::string& app_id, bool diagnostic_mode); | 356 void HandleLaunchKioskApp(const std::string& app_id, bool diagnostic_mode); |
357 void HandleRetrieveAuthenticatedUserEmail(double attempt_token); | 357 void HandleRetrieveAuthenticatedUserEmail(double attempt_token); |
358 | 358 |
359 | 359 |
360 // Returns true iff | 360 // Returns true iff |
361 // (i) log in is restricted to some user list, | 361 // (i) log in is restricted to some user list, |
362 // (ii) all users in the restricted list are present. | 362 // (ii) all users in the restricted list are present. |
363 bool AllWhitelistedUsersPresent(); | 363 bool AllWhitelistedUsersPresent(); |
364 | 364 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 scoped_ptr<AuthenticatedUserEmailRetriever> email_retriever_; | 462 scoped_ptr<AuthenticatedUserEmailRetriever> email_retriever_; |
463 | 463 |
464 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; | 464 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; |
465 | 465 |
466 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 466 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
467 }; | 467 }; |
468 | 468 |
469 } // namespace chromeos | 469 } // namespace chromeos |
470 | 470 |
471 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 471 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
OLD | NEW |