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

Unified Diff: ash/wm/lock_state_controller.h

Issue 811033002: Add device policy to disallow shutdown - ash UI modifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/test/test_lock_state_controller_delegate.cc ('k') | ash/wm/lock_state_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/lock_state_controller.h
diff --git a/ash/wm/lock_state_controller.h b/ash/wm/lock_state_controller.h
index 13974a4e06cf68bc9b936f8266316fe4d83e033a..035797af7c958e747ba52fe2e26002ac1c58659f 100644
--- a/ash/wm/lock_state_controller.h
+++ b/ash/wm/lock_state_controller.h
@@ -40,7 +40,6 @@ class ASH_EXPORT LockStateControllerDelegate {
virtual ~LockStateControllerDelegate() {}
virtual void RequestLockScreen() = 0;
- virtual void RequestRestart() = 0;
virtual void RequestShutdown() = 0;
private:
@@ -73,10 +72,6 @@ class ASH_EXPORT LockStateControllerDelegate {
class ASH_EXPORT LockStateController : public aura::WindowTreeHostObserver,
public ShellObserver {
public:
- // ShutdownMode determines whether the device will power off or reboot when
- // RequestShutdown is invoked.
- enum ShutdownMode { POWER_OFF, RESTART };
-
// Amount of time that the power button needs to be held before we lock the
// screen.
static const int kLockTimeoutMs;
@@ -137,7 +132,7 @@ class ASH_EXPORT LockStateController : public aura::WindowTreeHostObserver,
controller_->pre_shutdown_timer_.Stop();
}
void trigger_real_shutdown_timeout() {
- controller_->OnRealPowerTimeout(POWER_OFF);
+ controller_->OnRealPowerTimeout();
controller_->real_shutdown_timer_.Stop();
}
@@ -192,8 +187,9 @@ class ASH_EXPORT LockStateController : public aura::WindowTreeHostObserver,
// Called when Chrome gets a request to display the lock screen.
void OnStartingLock();
- // Displays the shutdown animation and requests shutdown when it's done.
- void RequestShutdown(ShutdownMode mode);
+ // Displays the shutdown animation and requests a system shutdown or system
+ // restart depending on the the state of the |RebootOnShutdown| device policy.
+ void RequestShutdown();
// Called when ScreenLocker is ready to close, but not yet destroyed.
// Can be used to display "hiding" animations on unlock.
@@ -242,13 +238,10 @@ class ASH_EXPORT LockStateController : public aura::WindowTreeHostObserver,
// Starts timer for final shutdown animation.
// If |with_animation_time| is true, it will also include time of "fade to
// white" shutdown animation.
- // If |shutdown_mode| is set to RESTART, the device will reboot.
- void StartRealShutdownTimer(bool with_animation_time,
- ShutdownMode shutdown_mode);
+ void StartRealShutdownTimer(bool with_animation_time);
- // Request that the machine be either restarted or shut down depending on
- // |shutdown_mode|.
- void OnRealPowerTimeout(ShutdownMode shutdown_mode);
+ // Request that the machine be shut down.
+ void OnRealPowerTimeout();
// Starts shutdown animation that can be cancelled and starts pre-shutdown
// timer.
« no previous file with comments | « ash/test/test_lock_state_controller_delegate.cc ('k') | ash/wm/lock_state_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698