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 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 gaia_screen_handler_->LoadAuthExtension(true /* force */, true /* offline */); | 1041 gaia_screen_handler_->LoadAuthExtension(true /* force */, true /* offline */); |
1042 UpdateUIState(UI_STATE_GAIA_SIGNIN, nullptr); | 1042 UpdateUIState(UI_STATE_GAIA_SIGNIN, nullptr); |
1043 } | 1043 } |
1044 | 1044 |
1045 void SigninScreenHandler::HandleShutdownSystem() { | 1045 void SigninScreenHandler::HandleShutdownSystem() { |
1046 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(); | 1046 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(); |
1047 } | 1047 } |
1048 | 1048 |
1049 void SigninScreenHandler::HandleLoadWallpaper(const AccountId& account_id) { | 1049 void SigninScreenHandler::HandleLoadWallpaper(const AccountId& account_id) { |
1050 if (delegate_) | 1050 if (delegate_) |
1051 delegate_->LoadWallpaper(account_id.GetUserEmail()); | 1051 delegate_->LoadWallpaper(account_id); |
1052 } | 1052 } |
1053 | 1053 |
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 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1233 if (ScreenLocker::default_screen_locker()) | 1233 if (ScreenLocker::default_screen_locker()) |
1234 ScreenLocker::default_screen_locker()->UnlockOnLoginSuccess(); | 1234 ScreenLocker::default_screen_locker()->UnlockOnLoginSuccess(); |
1235 } | 1235 } |
1236 | 1236 |
1237 void SigninScreenHandler::HandleShowLoadingTimeoutError() { | 1237 void SigninScreenHandler::HandleShowLoadingTimeoutError() { |
1238 UpdateState(NetworkError::ERROR_REASON_LOADING_TIMEOUT); | 1238 UpdateState(NetworkError::ERROR_REASON_LOADING_TIMEOUT); |
1239 } | 1239 } |
1240 | 1240 |
1241 void SigninScreenHandler::HandleFocusPod(const AccountId& account_id) { | 1241 void SigninScreenHandler::HandleFocusPod(const AccountId& account_id) { |
1242 SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get()); | 1242 SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get()); |
1243 WallpaperManager::Get()->SetUserWallpaperDelayed(account_id.GetUserEmail()); | 1243 WallpaperManager::Get()->SetUserWallpaperDelayed(account_id); |
1244 proximity_auth::ScreenlockBridge::Get()->SetFocusedUser( | 1244 proximity_auth::ScreenlockBridge::Get()->SetFocusedUser( |
1245 account_id.GetUserEmail()); | 1245 account_id.GetUserEmail()); |
1246 if (delegate_) | 1246 if (delegate_) |
1247 delegate_->CheckUserStatus(account_id); | 1247 delegate_->CheckUserStatus(account_id); |
1248 if (!test_focus_pod_callback_.is_null()) | 1248 if (!test_focus_pod_callback_.is_null()) |
1249 test_focus_pod_callback_.Run(); | 1249 test_focus_pod_callback_.Run(); |
1250 | 1250 |
1251 bool use_24hour_clock = false; | 1251 bool use_24hour_clock = false; |
1252 if (user_manager::UserManager::Get()->GetKnownUserBooleanPref( | 1252 if (user_manager::UserManager::Get()->GetKnownUserBooleanPref( |
1253 account_id, prefs::kUse24HourClock, &use_24hour_clock)) { | 1253 account_id, prefs::kUse24HourClock, &use_24hour_clock)) { |
(...skipping 157 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 |