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 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 context.has_users = !delegate_->GetUsers().empty(); | 1065 context.has_users = !delegate_->GetUsers().empty(); |
1066 gaia_screen_handler_->UpdateGaia(context); | 1066 gaia_screen_handler_->UpdateGaia(context); |
1067 UpdateAddButtonStatus(); | 1067 UpdateAddButtonStatus(); |
1068 } | 1068 } |
1069 | 1069 |
1070 void SigninScreenHandler::UpdateAddButtonStatus() { | 1070 void SigninScreenHandler::UpdateAddButtonStatus() { |
1071 CallJS("cr.ui.login.DisplayManager.updateAddUserButtonStatus", | 1071 CallJS("cr.ui.login.DisplayManager.updateAddUserButtonStatus", |
1072 AllWhitelistedUsersPresent()); | 1072 AllWhitelistedUsersPresent()); |
1073 } | 1073 } |
1074 | 1074 |
1075 void SigninScreenHandler::HandleAuthenticateUser(const std::string& username, | 1075 void SigninScreenHandler::HandleAuthenticateUser( |
1076 const std::string& password) { | 1076 const std::string& gaia_id, |
| 1077 const std::string& username, |
| 1078 const std::string& password) { |
1077 if (!delegate_) | 1079 if (!delegate_) |
1078 return; | 1080 return; |
1079 UserContext user_context(username); | 1081 UserContext user_context(username); |
1080 user_context.SetKey(Key(password)); | 1082 user_context.SetKey(Key(password)); |
1081 delegate_->Login(user_context, SigninSpecifics()); | 1083 delegate_->Login(user_context, SigninSpecifics()); |
1082 } | 1084 } |
1083 | 1085 |
1084 void SigninScreenHandler::HandleAttemptUnlock(const std::string& username) { | 1086 void SigninScreenHandler::HandleAttemptUnlock(const std::string& username) { |
1085 DCHECK(ScreenLocker::default_screen_locker()); | 1087 DCHECK(ScreenLocker::default_screen_locker()); |
1086 | 1088 |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1554 return gaia_screen_handler_->frame_error(); | 1556 return gaia_screen_handler_->frame_error(); |
1555 } | 1557 } |
1556 | 1558 |
1557 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { | 1559 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { |
1558 caps_lock_enabled_ = enabled; | 1560 caps_lock_enabled_ = enabled; |
1559 if (page_is_ready()) | 1561 if (page_is_ready()) |
1560 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); | 1562 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); |
1561 } | 1563 } |
1562 | 1564 |
1563 } // namespace chromeos | 1565 } // namespace chromeos |
OLD | NEW |