Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 776093004: Add device policy to disallow shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 // background, use offline version. 1110 // background, use offline version.
1111 gaia_screen_handler_->LoadAuthExtension(true, false, true); 1111 gaia_screen_handler_->LoadAuthExtension(true, false, true);
1112 UpdateUIState(UI_STATE_GAIA_SIGNIN, NULL); 1112 UpdateUIState(UI_STATE_GAIA_SIGNIN, NULL);
1113 } 1113 }
1114 1114
1115 void SigninScreenHandler::HandleShutdownSystem() { 1115 void SigninScreenHandler::HandleShutdownSystem() {
1116 #if defined(USE_ATHENA) 1116 #if defined(USE_ATHENA)
1117 chromeos::DBusThreadManager::Get()-> 1117 chromeos::DBusThreadManager::Get()->
1118 GetPowerManagerClient()->RequestShutdown(); 1118 GetPowerManagerClient()->RequestShutdown();
1119 #else 1119 #else
1120 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(); 1120 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(
1121 ash::LockStateController::POWER_OFF);
1121 #endif 1122 #endif
1122 } 1123 }
1123 1124
1124 void SigninScreenHandler::HandleLoadWallpaper(const std::string& email) { 1125 void SigninScreenHandler::HandleLoadWallpaper(const std::string& email) {
1125 if (delegate_) 1126 if (delegate_)
1126 delegate_->LoadWallpaper(email); 1127 delegate_->LoadWallpaper(email);
1127 } 1128 }
1128 1129
1129 void SigninScreenHandler::HandleRebootSystem() { 1130 void SigninScreenHandler::HandleRebootSystem() {
1130 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); 1131 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart();
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 return gaia_screen_handler_->frame_error(); 1556 return gaia_screen_handler_->frame_error();
1556 } 1557 }
1557 1558
1558 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { 1559 void SigninScreenHandler::OnCapsLockChanged(bool enabled) {
1559 caps_lock_enabled_ = enabled; 1560 caps_lock_enabled_ = enabled;
1560 if (page_is_ready()) 1561 if (page_is_ready())
1561 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); 1562 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_);
1562 } 1563 }
1563 1564
1564 } // namespace chromeos 1565 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698