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