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 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 } | 858 } |
859 | 859 |
860 void SigninScreenHandler::ClearUserPodPassword() { | 860 void SigninScreenHandler::ClearUserPodPassword() { |
861 core_oobe_actor_->ClearUserPodPassword(); | 861 core_oobe_actor_->ClearUserPodPassword(); |
862 } | 862 } |
863 | 863 |
864 void SigninScreenHandler::RefocusCurrentPod() { | 864 void SigninScreenHandler::RefocusCurrentPod() { |
865 core_oobe_actor_->RefocusCurrentPod(); | 865 core_oobe_actor_->RefocusCurrentPod(); |
866 } | 866 } |
867 | 867 |
868 void SigninScreenHandler::OnUserRemoved(const std::string& username, | 868 void SigninScreenHandler::OnUserRemoved(const AccountId& account_id, |
869 bool last_user_removed) { | 869 bool last_user_removed) { |
870 CallJS("login.AccountPickerScreen.removeUser", username); | 870 CallJS("login.AccountPickerScreen.removeUser", account_id); |
871 if (last_user_removed) | 871 if (last_user_removed) |
872 OnShowAddUser(); | 872 OnShowAddUser(); |
873 } | 873 } |
874 | 874 |
875 void SigninScreenHandler::OnUserImageChanged(const user_manager::User& user) { | 875 void SigninScreenHandler::OnUserImageChanged(const user_manager::User& user) { |
876 if (page_is_ready()) | 876 if (page_is_ready()) |
877 CallJS("login.AccountPickerScreen.updateUserImage", user.GetAccountId()); | 877 CallJS("login.AccountPickerScreen.updateUserImage", user.GetAccountId()); |
878 } | 878 } |
879 | 879 |
880 void SigninScreenHandler::OnPreferencesChanged() { | 880 void SigninScreenHandler::OnPreferencesChanged() { |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 void SigninScreenHandler::HandleRebootSystem() { | 1054 void SigninScreenHandler::HandleRebootSystem() { |
1055 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); | 1055 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); |
1056 } | 1056 } |
1057 | 1057 |
1058 void SigninScreenHandler::HandleRemoveUser(const AccountId& account_id) { | 1058 void SigninScreenHandler::HandleRemoveUser(const AccountId& account_id) { |
1059 ProfileMetrics::LogProfileDeleteUser( | 1059 ProfileMetrics::LogProfileDeleteUser( |
1060 ProfileMetrics::DELETE_PROFILE_USER_MANAGER); | 1060 ProfileMetrics::DELETE_PROFILE_USER_MANAGER); |
1061 | 1061 |
1062 if (!delegate_) | 1062 if (!delegate_) |
1063 return; | 1063 return; |
1064 delegate_->RemoveUser(account_id.GetUserEmail()); | 1064 delegate_->RemoveUser(account_id); |
1065 UpdateAddButtonStatus(); | 1065 UpdateAddButtonStatus(); |
1066 } | 1066 } |
1067 | 1067 |
1068 void SigninScreenHandler::HandleShowAddUser(const base::ListValue* args) { | 1068 void SigninScreenHandler::HandleShowAddUser(const base::ListValue* args) { |
1069 TRACE_EVENT_ASYNC_STEP_INTO0("ui", | 1069 TRACE_EVENT_ASYNC_STEP_INTO0("ui", |
1070 "ShowLoginWebUI", | 1070 "ShowLoginWebUI", |
1071 LoginDisplayHostImpl::kShowLoginWebUIid, | 1071 LoginDisplayHostImpl::kShowLoginWebUIid, |
1072 "ShowAddUser"); | 1072 "ShowAddUser"); |
1073 std::string email; | 1073 std::string email; |
1074 // |args| can be null if it's OOBE. | 1074 // |args| can be null if it's OOBE. |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 return gaia_screen_handler_->frame_error(); | 1411 return gaia_screen_handler_->frame_error(); |
1412 } | 1412 } |
1413 | 1413 |
1414 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { | 1414 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { |
1415 caps_lock_enabled_ = enabled; | 1415 caps_lock_enabled_ = enabled; |
1416 if (page_is_ready()) | 1416 if (page_is_ready()) |
1417 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); | 1417 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); |
1418 } | 1418 } |
1419 | 1419 |
1420 } // namespace chromeos | 1420 } // namespace chromeos |
OLD | NEW |