| 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 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |     5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 
|     6  |     6  | 
|     7 #include <algorithm> |     7 #include <algorithm> | 
|     8 #include <vector> |     8 #include <vector> | 
|     9  |     9  | 
|    10 #include "ash/shell.h" |    10 #include "ash/shell.h" | 
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   879  |   879  | 
|   880 void SigninScreenHandler::OnPreferencesChanged() { |   880 void SigninScreenHandler::OnPreferencesChanged() { | 
|   881   // Make sure that one of the login UI is fully functional now, otherwise |   881   // Make sure that one of the login UI is fully functional now, otherwise | 
|   882   // preferences update would be picked up next time it will be shown. |   882   // preferences update would be picked up next time it will be shown. | 
|   883   if (!webui_visible_) { |   883   if (!webui_visible_) { | 
|   884     LOG(WARNING) << "Login UI is not active - postponed prefs change."; |   884     LOG(WARNING) << "Login UI is not active - postponed prefs change."; | 
|   885     preferences_changed_delayed_ = true; |   885     preferences_changed_delayed_ = true; | 
|   886     return; |   886     return; | 
|   887   } |   887   } | 
|   888  |   888  | 
 |   889   // Send the updated user list to the UI. | 
 |   890   if (delegate_) | 
 |   891     delegate_->HandleGetUsers(); | 
 |   892  | 
|   889   if (delegate_ && !delegate_->IsShowUsers()) { |   893   if (delegate_ && !delegate_->IsShowUsers()) { | 
|   890     HandleShowAddUser(nullptr); |   894     HandleShowAddUser(nullptr); | 
|   891   } else { |   895   } else { | 
|   892     if (delegate_) |  | 
|   893       delegate_->HandleGetUsers(); |  | 
|   894     UpdateUIState(UI_STATE_ACCOUNT_PICKER, nullptr); |   896     UpdateUIState(UI_STATE_ACCOUNT_PICKER, nullptr); | 
|   895   } |   897   } | 
 |   898  | 
|   896   preferences_changed_delayed_ = false; |   899   preferences_changed_delayed_ = false; | 
|   897 } |   900 } | 
|   898  |   901  | 
|   899 void SigninScreenHandler::ResetSigninScreenHandlerDelegate() { |   902 void SigninScreenHandler::ResetSigninScreenHandlerDelegate() { | 
|   900   SetDelegate(nullptr); |   903   SetDelegate(nullptr); | 
|   901 } |   904 } | 
|   902  |   905  | 
|   903 void SigninScreenHandler::ShowError(int login_attempts, |   906 void SigninScreenHandler::ShowError(int login_attempts, | 
|   904                                     const std::string& error_text, |   907                                     const std::string& error_text, | 
|   905                                     const std::string& help_link_text, |   908                                     const std::string& help_link_text, | 
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1408   return gaia_screen_handler_->frame_error(); |  1411   return gaia_screen_handler_->frame_error(); | 
|  1409 } |  1412 } | 
|  1410  |  1413  | 
|  1411 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { |  1414 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { | 
|  1412   caps_lock_enabled_ = enabled; |  1415   caps_lock_enabled_ = enabled; | 
|  1413   if (page_is_ready()) |  1416   if (page_is_ready()) | 
|  1414     CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); |  1417     CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); | 
|  1415 } |  1418 } | 
|  1416  |  1419  | 
|  1417 }  // namespace chromeos |  1420 }  // namespace chromeos | 
| OLD | NEW |