| 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 "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 context.has_users = !delegate_->GetUsers().empty(); | 1084 context.has_users = !delegate_->GetUsers().empty(); |
| 1085 gaia_screen_handler_->UpdateGaia(context); | 1085 gaia_screen_handler_->UpdateGaia(context); |
| 1086 UpdateAddButtonStatus(); | 1086 UpdateAddButtonStatus(); |
| 1087 } | 1087 } |
| 1088 | 1088 |
| 1089 void SigninScreenHandler::UpdateAddButtonStatus() { | 1089 void SigninScreenHandler::UpdateAddButtonStatus() { |
| 1090 CallJS("cr.ui.login.DisplayManager.updateAddUserButtonStatus", | 1090 CallJS("cr.ui.login.DisplayManager.updateAddUserButtonStatus", |
| 1091 AllWhitelistedUsersPresent()); | 1091 AllWhitelistedUsersPresent()); |
| 1092 } | 1092 } |
| 1093 | 1093 |
| 1094 void SigninScreenHandler::HandleAuthenticateUser(const std::string& username, | 1094 void SigninScreenHandler::HandleAuthenticateUser( |
| 1095 const std::string& password) { | 1095 const std::string& username, |
| 1096 const std::string& password) { |
| 1096 if (!delegate_) | 1097 if (!delegate_) |
| 1097 return; | 1098 return; |
| 1098 UserContext user_context(username); | 1099 UserContext user_context(username); |
| 1099 user_context.SetKey(Key(password)); | 1100 user_context.SetKey(Key(password)); |
| 1100 delegate_->Login(user_context, SigninSpecifics()); | 1101 delegate_->Login(user_context, SigninSpecifics()); |
| 1101 } | 1102 } |
| 1102 | 1103 |
| 1103 void SigninScreenHandler::HandleAttemptUnlock(const std::string& username) { | 1104 void SigninScreenHandler::HandleAttemptUnlock(const std::string& username) { |
| 1104 if (!ScreenLocker::default_screen_locker()) { | 1105 if (!ScreenLocker::default_screen_locker()) { |
| 1105 OobeUI* oobe_ui = static_cast<OobeUI*>(web_ui()->GetController()); | 1106 OobeUI* oobe_ui = static_cast<OobeUI*>(web_ui()->GetController()); |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1582 return gaia_screen_handler_->frame_error(); | 1583 return gaia_screen_handler_->frame_error(); |
| 1583 } | 1584 } |
| 1584 | 1585 |
| 1585 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { | 1586 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { |
| 1586 caps_lock_enabled_ = enabled; | 1587 caps_lock_enabled_ = enabled; |
| 1587 if (page_is_ready()) | 1588 if (page_is_ready()) |
| 1588 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); | 1589 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); |
| 1589 } | 1590 } |
| 1590 | 1591 |
| 1591 } // namespace chromeos | 1592 } // namespace chromeos |
| OLD | NEW |