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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 void HandleLoginScreenUpdate(); | 367 void HandleLoginScreenUpdate(); |
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 | 376 |
368 // Sends the list of keyboard layouts available for the currently selected | 377 // Sends the list of |keyboard_layouts| available for the |locale| that is |
369 // public session locale. | 378 // currently selected for the public session identified by |user_id|. |
370 void SendPublicSessionKeyboardLayouts( | 379 void SendPublicSessionKeyboardLayouts( |
371 const std::string& user_id, | 380 const std::string& user_id, |
| 381 const std::string& locale, |
372 scoped_ptr<base::ListValue> keyboard_layouts); | 382 scoped_ptr<base::ListValue> keyboard_layouts); |
373 | 383 |
374 // Returns true iff | 384 // Returns true iff |
375 // (i) log in is restricted to some user list, | 385 // (i) log in is restricted to some user list, |
376 // (ii) all users in the restricted list are present. | 386 // (ii) all users in the restricted list are present. |
377 bool AllWhitelistedUsersPresent(); | 387 bool AllWhitelistedUsersPresent(); |
378 | 388 |
379 // Cancels password changed flow - switches back to login screen. | 389 // Cancels password changed flow - switches back to login screen. |
380 // Called as a callback after cookies are cleared. | 390 // Called as a callback after cookies are cleared. |
381 void CancelPasswordChangedFlowInternal(); | 391 void CancelPasswordChangedFlowInternal(); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 scoped_ptr<AuthenticatedUserEmailRetriever> email_retriever_; | 486 scoped_ptr<AuthenticatedUserEmailRetriever> email_retriever_; |
477 | 487 |
478 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; | 488 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; |
479 | 489 |
480 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 490 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
481 }; | 491 }; |
482 | 492 |
483 } // namespace chromeos | 493 } // namespace chromeos |
484 | 494 |
485 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 495 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
OLD | NEW |