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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h

Issue 12704002: Support for auth code based authentication flow for both app and web UI driven flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 20 matching lines...) Expand all
31 class DictionaryValue; 31 class DictionaryValue;
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 NativeWindowDelegate; 39 class NativeWindowDelegate;
40 class User; 40 class User;
41 struct UserCredentials;
41 42
42 // An interface for WebUILoginDisplay to call SigninScreenHandler. 43 // An interface for WebUILoginDisplay to call SigninScreenHandler.
43 class LoginDisplayWebUIHandler { 44 class LoginDisplayWebUIHandler {
44 public: 45 public:
45 virtual void ClearAndEnablePassword() = 0; 46 virtual void ClearAndEnablePassword() = 0;
46 virtual void ClearUserPodPassword() = 0; 47 virtual void ClearUserPodPassword() = 0;
47 virtual void OnLoginSuccess(const std::string& username) = 0; 48 virtual void OnLoginSuccess(const std::string& username) = 0;
48 virtual void OnUserRemoved(const std::string& username) = 0; 49 virtual void OnUserRemoved(const std::string& username) = 0;
49 virtual void OnUserImageChanged(const User& user) = 0; 50 virtual void OnUserImageChanged(const User& user) = 0;
50 virtual void OnPreferencesChanged() = 0; 51 virtual void OnPreferencesChanged() = 0;
(...skipping 17 matching lines...) Expand all
68 class SigninScreenHandlerDelegate { 69 class SigninScreenHandlerDelegate {
69 public: 70 public:
70 // Cancels current password changed flow. 71 // Cancels current password changed flow.
71 virtual void CancelPasswordChangedFlow() = 0; 72 virtual void CancelPasswordChangedFlow() = 0;
72 73
73 // Create a new Google account. 74 // Create a new Google account.
74 virtual void CreateAccount() = 0; 75 virtual void CreateAccount() = 0;
75 76
76 // Confirms sign up by provided |username| and |password| specified. 77 // Confirms sign up by provided |username| and |password| specified.
77 // Used for new user login via GAIA extension. 78 // Used for new user login via GAIA extension.
78 virtual void CompleteLogin(const std::string& username, 79 virtual void CompleteLogin(const UserCredentials& credentials) = 0;
79 const std::string& password) = 0;
80 80
81 // Sign in using |username| and |password| specified. 81 // Sign in using |username| and |password| specified.
82 // Used for both known and new users. 82 // Used for both known and new users.
83 virtual void Login(const std::string& username, 83 virtual void Login(const UserCredentials& credentials) = 0;
84 const std::string& password) = 0;
85 84
86 // Sign in into a retail mode session. 85 // Sign in into a retail mode session.
87 virtual void LoginAsRetailModeUser() = 0; 86 virtual void LoginAsRetailModeUser() = 0;
88 87
89 // Sign in into guest session. 88 // Sign in into guest session.
90 virtual void LoginAsGuest() = 0; 89 virtual void LoginAsGuest() = 0;
91 90
92 // Sign in into the public account identified by |username|. 91 // Sign in into the public account identified by |username|.
93 virtual void LoginAsPublicAccount(const std::string& username) = 0; 92 virtual void LoginAsPublicAccount(const std::string& username) = 0;
94 93
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 // shouldn't grab the focus. |offline| is true when offline version of the 272 // shouldn't grab the focus. |offline| is true when offline version of the
274 // extension should be used. 273 // extension should be used.
275 void LoadAuthExtension(bool force, bool silent_load, bool offline); 274 void LoadAuthExtension(bool force, bool silent_load, bool offline);
276 275
277 // Updates authentication extension. Called when device settings that affect 276 // Updates authentication extension. Called when device settings that affect
278 // sign-in (allow BWSI and allow whitelist) are changed. 277 // sign-in (allow BWSI and allow whitelist) are changed.
279 void UpdateAuthExtension(); 278 void UpdateAuthExtension();
280 void UpdateAddButtonStatus(); 279 void UpdateAddButtonStatus();
281 280
282 // WebUI message handlers. 281 // WebUI message handlers.
282 void HandleCompleteAuthentication(const base::ListValue* args);
283 void HandleCompleteLogin(const base::ListValue* args); 283 void HandleCompleteLogin(const base::ListValue* args);
284 void HandleGetUsers(const base::ListValue* args); 284 void HandleGetUsers(const base::ListValue* args);
285 void HandleAuthenticateUser(const base::ListValue* args); 285 void HandleAuthenticateUser(const base::ListValue* args);
286 void HandleLaunchDemoUser(const base::ListValue* args); 286 void HandleLaunchDemoUser(const base::ListValue* args);
287 void HandleLaunchIncognito(const base::ListValue* args); 287 void HandleLaunchIncognito(const base::ListValue* args);
288 void HandleLaunchPublicAccount(const base::ListValue* args); 288 void HandleLaunchPublicAccount(const base::ListValue* args);
289 void HandleOfflineLogin(const base::ListValue* args); 289 void HandleOfflineLogin(const base::ListValue* args);
290 void HandleShutdownSystem(const base::ListValue* args); 290 void HandleShutdownSystem(const base::ListValue* args);
291 void HandleLoadWallpaper(const base::ListValue* args); 291 void HandleLoadWallpaper(const base::ListValue* args);
292 void HandleRemoveUser(const base::ListValue* args); 292 void HandleRemoveUser(const base::ListValue* args);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 // NOTIFICATION_AUTH_NEEDED and reset on either NOTIFICATION_AUTH_SUPPLIED or 438 // NOTIFICATION_AUTH_NEEDED and reset on either NOTIFICATION_AUTH_SUPPLIED or
439 // NOTIFICATION_AUTH_CANCELLED. 439 // NOTIFICATION_AUTH_CANCELLED.
440 bool has_pending_auth_ui_; 440 bool has_pending_auth_ui_;
441 441
442 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); 442 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler);
443 }; 443 };
444 444
445 } // namespace chromeos 445 } // namespace chromeos
446 446
447 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ 447 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698