Chromium Code Reviews| Index: ash/system/chromeos/power/tablet_power_button_controller.h |
| diff --git a/ash/system/chromeos/power/tablet_power_button_controller.h b/ash/system/chromeos/power/tablet_power_button_controller.h |
| index b99148efaab18721db5814830f3ef9200d35a7c5..6edfec85a3d60f2021bd1d53e2c471b9e7ba3c21 100644 |
| --- a/ash/system/chromeos/power/tablet_power_button_controller.h |
| +++ b/ash/system/chromeos/power/tablet_power_button_controller.h |
| @@ -42,6 +42,12 @@ class ASH_EXPORT TabletPowerButtonController |
| // Emulates |shutdown_timer_| timeout. |
| void TriggerShutdownTimeout(); |
| + // Returns true when |lock_screen_timer_| is running. |
| + bool LockScreenTimerIsRunning() const; |
| + |
| + // Emulates |lock_screen_timer_| timeout. |
| + void TriggerLockScreenTimeout(); |
| + |
| private: |
| TabletPowerButtonController* controller_; // Not owned. |
| @@ -101,6 +107,9 @@ class ASH_EXPORT TabletPowerButtonController |
| // and locking is possible. |
| void LockScreenIfRequired(); |
| + // Called by |lock_screen_timer_| to start locking screen. |
| + void OnLockScreenTimeout(); |
| + |
| // True if the brightness level is currently set to off. |
| bool brightness_level_is_zero_ = false; |
| @@ -124,6 +133,12 @@ class ASH_EXPORT TabletPowerButtonController |
| // released. Runs OnShutdownTimeout() to start shutdown. |
| base::OneShotTimer shutdown_timer_; |
| + // Started when |shutdown_timer_| is still running when tablet power button is |
| + // released and it should SetDisplayForcedOff(true), and stopped when it times |
| + // out. Resets timer whenever there is a call of SetDisplayForcedOff(false). |
|
Daniel Erat
2017/01/12 01:40:47
this is a pretty complicated comment. could you us
Qiang(Joe) Xu
2017/01/12 15:05:55
done, thanks
|
| + // Runs OnLockScreenTimeout() to start locking screen. |
| + base::OneShotTimer lock_screen_timer_; |
| + |
| LockStateController* controller_; // Not owned. |
| base::WeakPtrFactory<TabletPowerButtonController> weak_ptr_factory_; |