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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 virtual void ShowGaiaPasswordChanged(const std::string& username) = 0; | 87 virtual void ShowGaiaPasswordChanged(const std::string& username) = 0; |
88 virtual void ShowSigninUI(const std::string& email) = 0; | 88 virtual void ShowSigninUI(const std::string& email) = 0; |
89 virtual void ShowPasswordChangedDialog(bool show_password_error) = 0; | 89 virtual void ShowPasswordChangedDialog(bool show_password_error) = 0; |
90 // Show sign-in screen for the given credentials. | 90 // Show sign-in screen for the given credentials. |
91 virtual void ShowSigninScreenForCreds(const std::string& username, | 91 virtual void ShowSigninScreenForCreds(const std::string& username, |
92 const std::string& password) = 0; | 92 const std::string& password) = 0; |
93 virtual void LoadUsers(const base::ListValue& users_list, | 93 virtual void LoadUsers(const base::ListValue& users_list, |
94 bool show_guest) = 0; | 94 bool show_guest) = 0; |
95 virtual void SetPublicSessionDisplayName(const std::string& user_id, | 95 virtual void SetPublicSessionDisplayName(const std::string& user_id, |
96 const std::string& display_name) = 0; | 96 const std::string& display_name) = 0; |
| 97 virtual void SetPublicSessionLocales(const std::string& user_id, |
| 98 scoped_ptr<base::ListValue> locales, |
| 99 const std::string& default_locale, |
| 100 bool multipleRecommendedLocales) = 0; |
97 | 101 |
98 protected: | 102 protected: |
99 virtual ~LoginDisplayWebUIHandler() {} | 103 virtual ~LoginDisplayWebUIHandler() {} |
100 }; | 104 }; |
101 | 105 |
102 // An interface for SigninScreenHandler to call WebUILoginDisplay. | 106 // An interface for SigninScreenHandler to call WebUILoginDisplay. |
103 class SigninScreenHandlerDelegate { | 107 class SigninScreenHandlerDelegate { |
104 public: | 108 public: |
105 // --------------- Password change flow methods. | 109 // --------------- Password change flow methods. |
106 // Cancels current password changed flow. | 110 // Cancels current password changed flow. |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 virtual void ShowSigninUI(const std::string& email) OVERRIDE; | 293 virtual void ShowSigninUI(const std::string& email) OVERRIDE; |
290 virtual void ShowPasswordChangedDialog(bool show_password_error) OVERRIDE; | 294 virtual void ShowPasswordChangedDialog(bool show_password_error) OVERRIDE; |
291 virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) OVERRIDE; | 295 virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) OVERRIDE; |
292 virtual void ShowSigninScreenForCreds(const std::string& username, | 296 virtual void ShowSigninScreenForCreds(const std::string& username, |
293 const std::string& password) OVERRIDE; | 297 const std::string& password) OVERRIDE; |
294 virtual void LoadUsers(const base::ListValue& users_list, | 298 virtual void LoadUsers(const base::ListValue& users_list, |
295 bool show_guest) OVERRIDE; | 299 bool show_guest) OVERRIDE; |
296 virtual void SetPublicSessionDisplayName( | 300 virtual void SetPublicSessionDisplayName( |
297 const std::string& user_id, | 301 const std::string& user_id, |
298 const std::string& display_name) OVERRIDE; | 302 const std::string& display_name) OVERRIDE; |
| 303 virtual void SetPublicSessionLocales( |
| 304 const std::string& user_id, |
| 305 scoped_ptr<base::ListValue> locales, |
| 306 const std::string& default_locale, |
| 307 bool multipleRecommendedLocales) OVERRIDE; |
299 | 308 |
300 // content::NotificationObserver implementation: | 309 // content::NotificationObserver implementation: |
301 virtual void Observe(int type, | 310 virtual void Observe(int type, |
302 const content::NotificationSource& source, | 311 const content::NotificationSource& source, |
303 const content::NotificationDetails& details) OVERRIDE; | 312 const content::NotificationDetails& details) OVERRIDE; |
304 | 313 |
305 // ScreenlockBridge::LockHandler implementation: | 314 // ScreenlockBridge::LockHandler implementation: |
306 virtual void ShowBannerMessage(const std::string& message) OVERRIDE; | 315 virtual void ShowBannerMessage(const std::string& message) OVERRIDE; |
307 virtual void ShowUserPodCustomIcon(const std::string& username, | 316 virtual void ShowUserPodCustomIcon(const std::string& username, |
308 const gfx::Image& icon) OVERRIDE; | 317 const gfx::Image& icon) OVERRIDE; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 void HandleShowLoadingTimeoutError(); | 368 void HandleShowLoadingTimeoutError(); |
360 void HandleUpdateOfflineLogin(bool offline_login_active); | 369 void HandleUpdateOfflineLogin(bool offline_login_active); |
361 void HandleShowSupervisedUserCreationScreen(); | 370 void HandleShowSupervisedUserCreationScreen(); |
362 void HandleFocusPod(const std::string& user_id); | 371 void HandleFocusPod(const std::string& user_id); |
363 void HandleLaunchKioskApp(const std::string& app_id, bool diagnostic_mode); | 372 void HandleLaunchKioskApp(const std::string& app_id, bool diagnostic_mode); |
364 void HandleRetrieveAuthenticatedUserEmail(double attempt_token); | 373 void HandleRetrieveAuthenticatedUserEmail(double attempt_token); |
365 void HandleGetPublicSessionKeyboardLayouts(const std::string& user_id, | 374 void HandleGetPublicSessionKeyboardLayouts(const std::string& user_id, |
366 const std::string& locale); | 375 const std::string& locale); |
367 void HandleCancelConsumerManagementEnrollment(); | 376 void HandleCancelConsumerManagementEnrollment(); |
368 | 377 |
369 // Sends the list of keyboard layouts available for the currently selected | 378 // Sends the list of |keyboard_layouts| available for the |locale| that is |
370 // public session locale. | 379 // currently selected for the public session identified by |user_id|. |
371 void SendPublicSessionKeyboardLayouts( | 380 void SendPublicSessionKeyboardLayouts( |
372 const std::string& user_id, | 381 const std::string& user_id, |
| 382 const std::string& locale, |
373 scoped_ptr<base::ListValue> keyboard_layouts); | 383 scoped_ptr<base::ListValue> keyboard_layouts); |
374 | 384 |
375 // Returns true iff | 385 // Returns true iff |
376 // (i) log in is restricted to some user list, | 386 // (i) log in is restricted to some user list, |
377 // (ii) all users in the restricted list are present. | 387 // (ii) all users in the restricted list are present. |
378 bool AllWhitelistedUsersPresent(); | 388 bool AllWhitelistedUsersPresent(); |
379 | 389 |
380 // Cancels password changed flow - switches back to login screen. | 390 // Cancels password changed flow - switches back to login screen. |
381 // Called as a callback after cookies are cleared. | 391 // Called as a callback after cookies are cleared. |
382 void CancelPasswordChangedFlowInternal(); | 392 void CancelPasswordChangedFlowInternal(); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 bool is_enrolling_consumer_management_; | 490 bool is_enrolling_consumer_management_; |
481 | 491 |
482 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; | 492 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; |
483 | 493 |
484 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 494 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
485 }; | 495 }; |
486 | 496 |
487 } // namespace chromeos | 497 } // namespace chromeos |
488 | 498 |
489 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 499 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
OLD | NEW |