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

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

Issue 811033002: Add device policy to disallow shutdown - ash UI modifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added ASH_EXPORT to ash::ShutdownPolicyObserver Created 5 years, 11 months 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 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 // background, use offline version. 1030 // background, use offline version.
1031 gaia_screen_handler_->LoadAuthExtension(true, false, true); 1031 gaia_screen_handler_->LoadAuthExtension(true, false, true);
1032 UpdateUIState(UI_STATE_GAIA_SIGNIN, NULL); 1032 UpdateUIState(UI_STATE_GAIA_SIGNIN, NULL);
1033 } 1033 }
1034 1034
1035 void SigninScreenHandler::HandleShutdownSystem() { 1035 void SigninScreenHandler::HandleShutdownSystem() {
1036 #if defined(USE_ATHENA) 1036 #if defined(USE_ATHENA)
1037 chromeos::DBusThreadManager::Get()-> 1037 chromeos::DBusThreadManager::Get()->
1038 GetPowerManagerClient()->RequestShutdown(); 1038 GetPowerManagerClient()->RequestShutdown();
1039 #else 1039 #else
1040 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown( 1040 ash::Shell::GetInstance()
1041 ash::LockStateController::POWER_OFF); 1041 ->lock_state_controller()
1042 ->RequestShutdown();
Daniel Erat 2015/01/21 15:25:40 nit: this can all fit on a single line now
cschuet (SLOW) 2015/01/21 15:34:41 Done.
1042 #endif 1043 #endif
1043 } 1044 }
1044 1045
1045 void SigninScreenHandler::HandleLoadWallpaper(const std::string& email) { 1046 void SigninScreenHandler::HandleLoadWallpaper(const std::string& email) {
1046 if (delegate_) 1047 if (delegate_)
1047 delegate_->LoadWallpaper(email); 1048 delegate_->LoadWallpaper(email);
1048 } 1049 }
1049 1050
1050 void SigninScreenHandler::HandleRebootSystem() { 1051 void SigninScreenHandler::HandleRebootSystem() {
1051 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); 1052 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart();
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 return gaia_screen_handler_->frame_error(); 1401 return gaia_screen_handler_->frame_error();
1401 } 1402 }
1402 1403
1403 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { 1404 void SigninScreenHandler::OnCapsLockChanged(bool enabled) {
1404 caps_lock_enabled_ = enabled; 1405 caps_lock_enabled_ = enabled;
1405 if (page_is_ready()) 1406 if (page_is_ready())
1406 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); 1407 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_);
1407 } 1408 }
1408 1409
1409 } // namespace chromeos 1410 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_common.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698