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

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: rebase 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 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 // background, use offline version. 1106 // background, use offline version.
1107 gaia_screen_handler_->LoadAuthExtension(true, false, true); 1107 gaia_screen_handler_->LoadAuthExtension(true, false, true);
1108 UpdateUIState(UI_STATE_GAIA_SIGNIN, NULL); 1108 UpdateUIState(UI_STATE_GAIA_SIGNIN, NULL);
1109 } 1109 }
1110 1110
1111 void SigninScreenHandler::HandleShutdownSystem() { 1111 void SigninScreenHandler::HandleShutdownSystem() {
1112 #if defined(USE_ATHENA) 1112 #if defined(USE_ATHENA)
1113 chromeos::DBusThreadManager::Get()-> 1113 chromeos::DBusThreadManager::Get()->
1114 GetPowerManagerClient()->RequestShutdown(); 1114 GetPowerManagerClient()->RequestShutdown();
1115 #else 1115 #else
1116 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(); 1116 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(
1117 ash::LockStateController::POWER_OFF);
1117 #endif 1118 #endif
1118 } 1119 }
1119 1120
1120 void SigninScreenHandler::HandleLoadWallpaper(const std::string& email) { 1121 void SigninScreenHandler::HandleLoadWallpaper(const std::string& email) {
1121 if (delegate_) 1122 if (delegate_)
1122 delegate_->LoadWallpaper(email); 1123 delegate_->LoadWallpaper(email);
1123 } 1124 }
1124 1125
1125 void SigninScreenHandler::HandleRebootSystem() { 1126 void SigninScreenHandler::HandleRebootSystem() {
1126 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); 1127 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart();
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 return gaia_screen_handler_->frame_error(); 1517 return gaia_screen_handler_->frame_error();
1517 } 1518 }
1518 1519
1519 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { 1520 void SigninScreenHandler::OnCapsLockChanged(bool enabled) {
1520 caps_lock_enabled_ = enabled; 1521 caps_lock_enabled_ = enabled;
1521 if (page_is_ready()) 1522 if (page_is_ready())
1522 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); 1523 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_);
1523 } 1524 }
1524 1525
1525 } // namespace chromeos 1526 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/shutdown_policy_observer_unittest.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698