| Index: ash/wm/power_button_controller.h
|
| diff --git a/ash/wm/power_button_controller.h b/ash/wm/power_button_controller.h
|
| index 7f3696f5eea1c152e49409c6e70a3b4604419b59..7043966f92a9d439ef664804e47343fab0d6804c 100644
|
| --- a/ash/wm/power_button_controller.h
|
| +++ b/ash/wm/power_button_controller.h
|
| @@ -4,8 +4,6 @@
|
|
|
| #ifndef ASH_WM_POWER_BUTTON_CONTROLLER_H_
|
| #define ASH_WM_POWER_BUTTON_CONTROLLER_H_
|
| -
|
| -#include <memory>
|
|
|
| #include "ash/ash_export.h"
|
| #include "base/macros.h"
|
| @@ -28,10 +26,11 @@
|
|
|
| namespace ash {
|
|
|
| +namespace test {
|
| +class PowerButtonControllerTest;
|
| +}
|
| +
|
| class LockStateController;
|
| -#if defined(OS_CHROMEOS)
|
| -class TabletPowerButtonController;
|
| -#endif
|
|
|
| // Handles power & lock button events which may result in the locking or
|
| // shutting down of the system as well as taking screen shots while in maximize
|
| @@ -54,6 +53,10 @@
|
| has_legacy_power_button_ = legacy;
|
| }
|
|
|
| + void set_enable_quick_lock_for_test(bool enable_quick_lock) {
|
| + enable_quick_lock_ = enable_quick_lock;
|
| + }
|
| +
|
| // Called when the current screen brightness changes.
|
| void OnScreenBrightnessChanged(double percent);
|
|
|
| @@ -72,13 +75,11 @@
|
| // Overridden from chromeos::PowerManagerClient::Observer:
|
| void PowerButtonEventReceived(bool down,
|
| const base::TimeTicks& timestamp) override;
|
| -
|
| - TabletPowerButtonController* tablet_power_button_controller_for_test() {
|
| - return tablet_controller_.get();
|
| - }
|
| #endif
|
|
|
| private:
|
| + friend class test::PowerButtonControllerTest;
|
| +
|
| // Are the power or lock buttons currently held?
|
| bool power_button_down_;
|
| bool lock_button_down_;
|
| @@ -104,12 +105,10 @@
|
| // that misreports power button releases?
|
| bool has_legacy_power_button_;
|
|
|
| - LockStateController* lock_state_controller_; // Not owned.
|
| + // Enables quick, non-cancellable locking of the screen when in maximize mode.
|
| + bool enable_quick_lock_;
|
|
|
| -#if defined(OS_CHROMEOS)
|
| - // Handles events for convertible/tablet devices.
|
| - std::unique_ptr<TabletPowerButtonController> tablet_controller_;
|
| -#endif
|
| + LockStateController* controller_; // Not owned.
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PowerButtonController);
|
| };
|
|
|