Chromium Code Reviews| Index: ash/wm/power_button_controller.h |
| diff --git a/ash/wm/power_button_controller.h b/ash/wm/power_button_controller.h |
| index 7043966f92a9d439ef664804e47343fab0d6804c..33f01450da0656b7a25304072ade3a704b9ca6db 100644 |
| --- a/ash/wm/power_button_controller.h |
| +++ b/ash/wm/power_button_controller.h |
| @@ -26,11 +26,10 @@ class Layer; |
| 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 |
| @@ -53,10 +52,6 @@ class ASH_EXPORT PowerButtonController |
| 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); |
| @@ -78,8 +73,6 @@ class ASH_EXPORT PowerButtonController |
| #endif |
| private: |
| - friend class test::PowerButtonControllerTest; |
| - |
| // Are the power or lock buttons currently held? |
| bool power_button_down_; |
| bool lock_button_down_; |
| @@ -105,10 +98,12 @@ class ASH_EXPORT PowerButtonController |
| // that misreports power button releases? |
| bool has_legacy_power_button_; |
| - // Enables quick, non-cancellable locking of the screen when in maximize mode. |
| - bool enable_quick_lock_; |
| + LockStateController* lock_state_controller_; // Not owned. |
| - LockStateController* controller_; // Not owned. |
| +#if defined(OS_CHROMEOS) |
| + // Handles events for convertible/tablet devices. |
| + std::unique_ptr<TabletPowerButtonController> tablet_controller_; |
|
Daniel Erat
2016/11/10 22:48:55
you need to #include <memory> for this
Qiang(Joe) Xu
2016/11/11 04:39:23
Done.
|
| +#endif |
| DISALLOW_COPY_AND_ASSIGN(PowerButtonController); |
| }; |