This source file includes following definitions.
- RequestLockScreen
- RequestShutdown
#include "chrome/browser/chromeos/power/session_state_controller_delegate_chromeos.h"
#include "base/logging.h"
#include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/power_manager_client.h"
#include "chromeos/dbus/session_manager_client.h"
namespace chromeos {
void SessionStateControllerDelegateChromeos::RequestLockScreen() {
if (KioskModeSettings::Get()->IsKioskModeEnabled()) {
chrome::AttemptUserExit();
return;
}
LOG(WARNING) << "Requesting screen lock from SessionStateControllerDelegate";
DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen();
}
void SessionStateControllerDelegateChromeos::RequestShutdown() {
DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown();
}
}