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 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 args->GetString(0, &email); | 1021 args->GetString(0, &email); |
1022 | 1022 |
1023 gaia_screen_handler_->PopulateEmail(email); | 1023 gaia_screen_handler_->PopulateEmail(email); |
1024 // Load auth extension. Parameters are: force reload, do not load extension in | 1024 // Load auth extension. Parameters are: force reload, do not load extension in |
1025 // background, use offline version. | 1025 // background, use offline version. |
1026 gaia_screen_handler_->LoadAuthExtension(true, false, true); | 1026 gaia_screen_handler_->LoadAuthExtension(true, false, true); |
1027 UpdateUIState(UI_STATE_GAIA_SIGNIN, NULL); | 1027 UpdateUIState(UI_STATE_GAIA_SIGNIN, NULL); |
1028 } | 1028 } |
1029 | 1029 |
1030 void SigninScreenHandler::HandleShutdownSystem() { | 1030 void SigninScreenHandler::HandleShutdownSystem() { |
1031 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown( | 1031 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(); |
1032 ash::LockStateController::POWER_OFF); | |
1033 } | 1032 } |
1034 | 1033 |
1035 void SigninScreenHandler::HandleLoadWallpaper(const std::string& email) { | 1034 void SigninScreenHandler::HandleLoadWallpaper(const std::string& email) { |
1036 if (delegate_) | 1035 if (delegate_) |
1037 delegate_->LoadWallpaper(email); | 1036 delegate_->LoadWallpaper(email); |
1038 } | 1037 } |
1039 | 1038 |
1040 void SigninScreenHandler::HandleRebootSystem() { | 1039 void SigninScreenHandler::HandleRebootSystem() { |
1041 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); | 1040 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); |
1042 } | 1041 } |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1382 return gaia_screen_handler_->frame_error(); | 1381 return gaia_screen_handler_->frame_error(); |
1383 } | 1382 } |
1384 | 1383 |
1385 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { | 1384 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { |
1386 caps_lock_enabled_ = enabled; | 1385 caps_lock_enabled_ = enabled; |
1387 if (page_is_ready()) | 1386 if (page_is_ready()) |
1388 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); | 1387 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); |
1389 } | 1388 } |
1390 | 1389 |
1391 } // namespace chromeos | 1390 } // namespace chromeos |
OLD | NEW |