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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 class ListValue; | 32 class ListValue; |
33 } | 33 } |
34 | 34 |
35 namespace chromeos { | 35 namespace chromeos { |
36 | 36 |
37 class CaptivePortalWindowProxy; | 37 class CaptivePortalWindowProxy; |
38 class ErrorScreenActor; | 38 class ErrorScreenActor; |
39 class LocallyManagedUserCreationScreenHandler; | 39 class LocallyManagedUserCreationScreenHandler; |
40 class NativeWindowDelegate; | 40 class NativeWindowDelegate; |
41 class User; | 41 class User; |
| 42 struct UserCredentials; |
42 | 43 |
43 // An interface for WebUILoginDisplay to call SigninScreenHandler. | 44 // An interface for WebUILoginDisplay to call SigninScreenHandler. |
44 class LoginDisplayWebUIHandler { | 45 class LoginDisplayWebUIHandler { |
45 public: | 46 public: |
46 virtual void ClearAndEnablePassword() = 0; | 47 virtual void ClearAndEnablePassword() = 0; |
47 virtual void ClearUserPodPassword() = 0; | 48 virtual void ClearUserPodPassword() = 0; |
48 virtual void OnLoginSuccess(const std::string& username) = 0; | 49 virtual void OnLoginSuccess(const std::string& username) = 0; |
49 virtual void OnUserRemoved(const std::string& username) = 0; | 50 virtual void OnUserRemoved(const std::string& username) = 0; |
50 virtual void OnUserImageChanged(const User& user) = 0; | 51 virtual void OnUserImageChanged(const User& user) = 0; |
51 virtual void OnPreferencesChanged() = 0; | 52 virtual void OnPreferencesChanged() = 0; |
(...skipping 17 matching lines...) Expand all Loading... |
69 class SigninScreenHandlerDelegate { | 70 class SigninScreenHandlerDelegate { |
70 public: | 71 public: |
71 // Cancels current password changed flow. | 72 // Cancels current password changed flow. |
72 virtual void CancelPasswordChangedFlow() = 0; | 73 virtual void CancelPasswordChangedFlow() = 0; |
73 | 74 |
74 // Create a new Google account. | 75 // Create a new Google account. |
75 virtual void CreateAccount() = 0; | 76 virtual void CreateAccount() = 0; |
76 | 77 |
77 // Confirms sign up by provided |username| and |password| specified. | 78 // Confirms sign up by provided |username| and |password| specified. |
78 // Used for new user login via GAIA extension. | 79 // Used for new user login via GAIA extension. |
79 virtual void CompleteLogin(const std::string& username, | 80 virtual void CompleteLogin(const UserCredentials& credentials) = 0; |
80 const std::string& password) = 0; | |
81 | 81 |
82 // Sign in using |username| and |password| specified. | 82 // Sign in using |username| and |password| specified. |
83 // Used for both known and new users. | 83 // Used for both known and new users. |
84 virtual void Login(const std::string& username, | 84 virtual void Login(const UserCredentials& credentials) = 0; |
85 const std::string& password) = 0; | |
86 | 85 |
87 // Sign in into a retail mode session. | 86 // Sign in into a retail mode session. |
88 virtual void LoginAsRetailModeUser() = 0; | 87 virtual void LoginAsRetailModeUser() = 0; |
89 | 88 |
90 // Sign in into guest session. | 89 // Sign in into guest session. |
91 virtual void LoginAsGuest() = 0; | 90 virtual void LoginAsGuest() = 0; |
92 | 91 |
93 // Sign in into the public account identified by |username|. | 92 // Sign in into the public account identified by |username|. |
94 virtual void LoginAsPublicAccount(const std::string& username) = 0; | 93 virtual void LoginAsPublicAccount(const std::string& username) = 0; |
95 | 94 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 // shouldn't grab the focus. |offline| is true when offline version of the | 274 // shouldn't grab the focus. |offline| is true when offline version of the |
276 // extension should be used. | 275 // extension should be used. |
277 void LoadAuthExtension(bool force, bool silent_load, bool offline); | 276 void LoadAuthExtension(bool force, bool silent_load, bool offline); |
278 | 277 |
279 // Updates authentication extension. Called when device settings that affect | 278 // Updates authentication extension. Called when device settings that affect |
280 // sign-in (allow BWSI and allow whitelist) are changed. | 279 // sign-in (allow BWSI and allow whitelist) are changed. |
281 void UpdateAuthExtension(); | 280 void UpdateAuthExtension(); |
282 void UpdateAddButtonStatus(); | 281 void UpdateAddButtonStatus(); |
283 | 282 |
284 // WebUI message handlers. | 283 // WebUI message handlers. |
| 284 void HandleCompleteAuthentication(const base::ListValue* args); |
285 void HandleCompleteLogin(const base::ListValue* args); | 285 void HandleCompleteLogin(const base::ListValue* args); |
286 void HandleGetUsers(const base::ListValue* args); | 286 void HandleGetUsers(const base::ListValue* args); |
287 void HandleAuthenticateUser(const base::ListValue* args); | 287 void HandleAuthenticateUser(const base::ListValue* args); |
288 void HandleLaunchDemoUser(const base::ListValue* args); | 288 void HandleLaunchDemoUser(const base::ListValue* args); |
289 void HandleLaunchIncognito(const base::ListValue* args); | 289 void HandleLaunchIncognito(const base::ListValue* args); |
290 void HandleLaunchPublicAccount(const base::ListValue* args); | 290 void HandleLaunchPublicAccount(const base::ListValue* args); |
291 void HandleOfflineLogin(const base::ListValue* args); | 291 void HandleOfflineLogin(const base::ListValue* args); |
292 void HandleShutdownSystem(const base::ListValue* args); | 292 void HandleShutdownSystem(const base::ListValue* args); |
293 void HandleLoadWallpaper(const base::ListValue* args); | 293 void HandleLoadWallpaper(const base::ListValue* args); |
294 void HandleRemoveUser(const base::ListValue* args); | 294 void HandleRemoveUser(const base::ListValue* args); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 // NOTIFICATION_AUTH_NEEDED and reset on either NOTIFICATION_AUTH_SUPPLIED or | 437 // NOTIFICATION_AUTH_NEEDED and reset on either NOTIFICATION_AUTH_SUPPLIED or |
438 // NOTIFICATION_AUTH_CANCELLED. | 438 // NOTIFICATION_AUTH_CANCELLED. |
439 bool has_pending_auth_ui_; | 439 bool has_pending_auth_ui_; |
440 | 440 |
441 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 441 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
442 }; | 442 }; |
443 | 443 |
444 } // namespace chromeos | 444 } // namespace chromeos |
445 | 445 |
446 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 446 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
OLD | NEW |