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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 virtual void ClearUserPodPassword() = 0; | 72 virtual void ClearUserPodPassword() = 0; |
73 virtual void OnLoginSuccess(const std::string& username) = 0; | 73 virtual void OnLoginSuccess(const std::string& username) = 0; |
74 virtual void OnUserRemoved(const std::string& username) = 0; | 74 virtual void OnUserRemoved(const std::string& username) = 0; |
75 virtual void OnUserImageChanged(const User& user) = 0; | 75 virtual void OnUserImageChanged(const User& user) = 0; |
76 virtual void OnPreferencesChanged() = 0; | 76 virtual void OnPreferencesChanged() = 0; |
77 virtual void ResetSigninScreenHandlerDelegate() = 0; | 77 virtual void ResetSigninScreenHandlerDelegate() = 0; |
78 virtual void ShowBannerMessage(const std::string& message) = 0; | 78 virtual void ShowBannerMessage(const std::string& message) = 0; |
79 virtual void ShowUserPodButton(const std::string& username, | 79 virtual void ShowUserPodButton(const std::string& username, |
80 const std::string& iconURL, | 80 const std::string& iconURL, |
81 const base::Closure& click_callback) = 0; | 81 const base::Closure& click_callback) = 0; |
| 82 virtual void HideUserPodButton(const std::string& username) = 0; |
| 83 virtual void SetAuthType(const std::string& username, |
| 84 LoginDisplay::AuthType auth_type, |
| 85 const std::string& initial_value) = 0; |
| 86 virtual LoginDisplay::AuthType GetAuthType(const std::string& username) |
| 87 const = 0; |
82 virtual void ShowError(int login_attempts, | 88 virtual void ShowError(int login_attempts, |
83 const std::string& error_text, | 89 const std::string& error_text, |
84 const std::string& help_link_text, | 90 const std::string& help_link_text, |
85 HelpAppLauncher::HelpTopic help_topic_id) = 0; | 91 HelpAppLauncher::HelpTopic help_topic_id) = 0; |
86 virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) = 0; | 92 virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) = 0; |
87 virtual void ShowGaiaPasswordChanged(const std::string& username) = 0; | 93 virtual void ShowGaiaPasswordChanged(const std::string& username) = 0; |
88 virtual void ShowSigninUI(const std::string& email) = 0; | 94 virtual void ShowSigninUI(const std::string& email) = 0; |
89 virtual void ShowPasswordChangedDialog(bool show_password_error) = 0; | 95 virtual void ShowPasswordChangedDialog(bool show_password_error) = 0; |
90 // Show sign-in screen for the given credentials. | 96 // Show sign-in screen for the given credentials. |
91 virtual void ShowSigninScreenForCreds(const std::string& username, | 97 virtual void ShowSigninScreenForCreds(const std::string& username, |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 virtual void ClearUserPodPassword() OVERRIDE; | 278 virtual void ClearUserPodPassword() OVERRIDE; |
273 virtual void OnLoginSuccess(const std::string& username) OVERRIDE; | 279 virtual void OnLoginSuccess(const std::string& username) OVERRIDE; |
274 virtual void OnUserRemoved(const std::string& username) OVERRIDE; | 280 virtual void OnUserRemoved(const std::string& username) OVERRIDE; |
275 virtual void OnUserImageChanged(const User& user) OVERRIDE; | 281 virtual void OnUserImageChanged(const User& user) OVERRIDE; |
276 virtual void OnPreferencesChanged() OVERRIDE; | 282 virtual void OnPreferencesChanged() OVERRIDE; |
277 virtual void ResetSigninScreenHandlerDelegate() OVERRIDE; | 283 virtual void ResetSigninScreenHandlerDelegate() OVERRIDE; |
278 virtual void ShowBannerMessage(const std::string& message) OVERRIDE; | 284 virtual void ShowBannerMessage(const std::string& message) OVERRIDE; |
279 virtual void ShowUserPodButton(const std::string& username, | 285 virtual void ShowUserPodButton(const std::string& username, |
280 const std::string& iconURL, | 286 const std::string& iconURL, |
281 const base::Closure& click_callback) OVERRIDE; | 287 const base::Closure& click_callback) OVERRIDE; |
| 288 virtual void HideUserPodButton(const std::string& username) OVERRIDE; |
| 289 virtual void SetAuthType(const std::string& username, |
| 290 LoginDisplay::AuthType auth_type, |
| 291 const std::string& initial_value) OVERRIDE; |
| 292 virtual LoginDisplay::AuthType GetAuthType(const std::string& username) |
| 293 const OVERRIDE; |
282 virtual void ShowError(int login_attempts, | 294 virtual void ShowError(int login_attempts, |
283 const std::string& error_text, | 295 const std::string& error_text, |
284 const std::string& help_link_text, | 296 const std::string& help_link_text, |
285 HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE; | 297 HelpAppLauncher::HelpTopic help_topic_id) OVERRIDE; |
286 virtual void ShowGaiaPasswordChanged(const std::string& username) OVERRIDE; | 298 virtual void ShowGaiaPasswordChanged(const std::string& username) OVERRIDE; |
287 virtual void ShowSigninUI(const std::string& email) OVERRIDE; | 299 virtual void ShowSigninUI(const std::string& email) OVERRIDE; |
288 virtual void ShowPasswordChangedDialog(bool show_password_error) OVERRIDE; | 300 virtual void ShowPasswordChangedDialog(bool show_password_error) OVERRIDE; |
289 virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) OVERRIDE; | 301 virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) OVERRIDE; |
290 virtual void ShowSigninScreenForCreds(const std::string& username, | 302 virtual void ShowSigninScreenForCreds(const std::string& username, |
291 const std::string& password) OVERRIDE; | 303 const std::string& password) OVERRIDE; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 void HandleShowLocallyManagedUserCreationScreen(); | 375 void HandleShowLocallyManagedUserCreationScreen(); |
364 void HandleFocusPod(const std::string& user_id); | 376 void HandleFocusPod(const std::string& user_id); |
365 void HandleLaunchKioskApp(const std::string& app_id, bool diagnostic_mode); | 377 void HandleLaunchKioskApp(const std::string& app_id, bool diagnostic_mode); |
366 void HandleCustomButtonClicked(const std::string& username); | 378 void HandleCustomButtonClicked(const std::string& username); |
367 void HandleRetrieveAuthenticatedUserEmail(double attempt_token); | 379 void HandleRetrieveAuthenticatedUserEmail(double attempt_token); |
368 | 380 |
369 // Fills |user_dict| with information about |user|. | 381 // Fills |user_dict| with information about |user|. |
370 static void FillUserDictionary(User* user, | 382 static void FillUserDictionary(User* user, |
371 bool is_owner, | 383 bool is_owner, |
372 bool is_signin_to_add, | 384 bool is_signin_to_add, |
| 385 LoginDisplay::AuthType auth_type, |
373 base::DictionaryValue* user_dict); | 386 base::DictionaryValue* user_dict); |
374 | 387 |
375 // Sends user list to account picker. | 388 // Sends user list to account picker. |
376 void SendUserList(bool animated); | 389 void SendUserList(bool animated); |
377 | 390 |
378 // Kick off cookie / local storage cleanup. | 391 // Kick off cookie / local storage cleanup. |
379 void StartClearingCookies(const base::Closure& on_clear_callback); | 392 void StartClearingCookies(const base::Closure& on_clear_callback); |
380 void OnCookiesCleared(base::Closure on_clear_callback); | 393 void OnCookiesCleared(base::Closure on_clear_callback); |
381 | 394 |
382 // Kick off DNS cache flushing. | 395 // Kick off DNS cache flushing. |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 scoped_ptr<CrosSettings::ObserverSubscription> allow_new_user_subscription_; | 532 scoped_ptr<CrosSettings::ObserverSubscription> allow_new_user_subscription_; |
520 scoped_ptr<CrosSettings::ObserverSubscription> allow_guest_subscription_; | 533 scoped_ptr<CrosSettings::ObserverSubscription> allow_guest_subscription_; |
521 | 534 |
522 bool wait_for_auto_enrollment_check_; | 535 bool wait_for_auto_enrollment_check_; |
523 | 536 |
524 base::Closure kiosk_enable_flow_aborted_callback_for_test_; | 537 base::Closure kiosk_enable_flow_aborted_callback_for_test_; |
525 | 538 |
526 // Map of callbacks run when the custom button on a user pod is clicked. | 539 // Map of callbacks run when the custom button on a user pod is clicked. |
527 std::map<std::string, base::Closure> user_pod_button_callback_map_; | 540 std::map<std::string, base::Closure> user_pod_button_callback_map_; |
528 | 541 |
| 542 // Map of usernames to their current authentication type. If a user is not |
| 543 // contained in the map, it is using the default authentication type. |
| 544 std::map<std::string, LoginDisplay::AuthType> user_auth_type_map_; |
| 545 |
529 // Non-owning ptr. | 546 // Non-owning ptr. |
530 // TODO (ygorshenin@): remove this dependency. | 547 // TODO (ygorshenin@): remove this dependency. |
531 GaiaScreenHandler* gaia_screen_handler_; | 548 GaiaScreenHandler* gaia_screen_handler_; |
532 | 549 |
533 // Helper that retrieves the authenticated user's e-mail address. | 550 // Helper that retrieves the authenticated user's e-mail address. |
534 scoped_ptr<AuthenticatedUserEmailRetriever> email_retriever_; | 551 scoped_ptr<AuthenticatedUserEmailRetriever> email_retriever_; |
535 | 552 |
536 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 553 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
537 }; | 554 }; |
538 | 555 |
539 } // namespace chromeos | 556 } // namespace chromeos |
540 | 557 |
541 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 558 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
OLD | NEW |