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 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 context.has_users = !delegate_->GetUsers().empty(); | 1033 context.has_users = !delegate_->GetUsers().empty(); |
1034 gaia_screen_handler_->UpdateGaia(context); | 1034 gaia_screen_handler_->UpdateGaia(context); |
1035 UpdateAddButtonStatus(); | 1035 UpdateAddButtonStatus(); |
1036 } | 1036 } |
1037 | 1037 |
1038 void SigninScreenHandler::UpdateAddButtonStatus() { | 1038 void SigninScreenHandler::UpdateAddButtonStatus() { |
1039 CallJS("cr.ui.login.DisplayManager.updateAddUserButtonStatus", | 1039 CallJS("cr.ui.login.DisplayManager.updateAddUserButtonStatus", |
1040 AllWhitelistedUsersPresent()); | 1040 AllWhitelistedUsersPresent()); |
1041 } | 1041 } |
1042 | 1042 |
1043 void SigninScreenHandler::HandleAuthenticateUser(const std::string& username, | 1043 void SigninScreenHandler::HandleAuthenticateUser( |
1044 const std::string& password) { | 1044 const std::string& gaia_id, |
| 1045 const std::string& username, |
| 1046 const std::string& password) { |
1045 if (!delegate_) | 1047 if (!delegate_) |
1046 return; | 1048 return; |
1047 UserContext user_context(username); | 1049 UserContext user_context(username); |
1048 user_context.SetKey(Key(password)); | 1050 user_context.SetKey(Key(password)); |
1049 delegate_->Login(user_context, SigninSpecifics()); | 1051 delegate_->Login(user_context, SigninSpecifics()); |
1050 } | 1052 } |
1051 | 1053 |
1052 void SigninScreenHandler::HandleAttemptUnlock(const std::string& username) { | 1054 void SigninScreenHandler::HandleAttemptUnlock(const std::string& username) { |
1053 DCHECK(ScreenLocker::default_screen_locker()); | 1055 DCHECK(ScreenLocker::default_screen_locker()); |
1054 | 1056 |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1512 return gaia_screen_handler_->frame_error(); | 1514 return gaia_screen_handler_->frame_error(); |
1513 } | 1515 } |
1514 | 1516 |
1515 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { | 1517 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { |
1516 caps_lock_enabled_ = enabled; | 1518 caps_lock_enabled_ = enabled; |
1517 if (page_is_ready()) | 1519 if (page_is_ready()) |
1518 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); | 1520 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); |
1519 } | 1521 } |
1520 | 1522 |
1521 } // namespace chromeos | 1523 } // namespace chromeos |
OLD | NEW |