Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_ |
| 6 #define ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_ | 6 #define ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 // True if the screen was off when the power button was pressed. | 104 // True if the screen was off when the power button was pressed. |
| 105 bool screen_off_when_power_button_down_ = false; | 105 bool screen_off_when_power_button_down_ = false; |
| 106 | 106 |
| 107 // Time source for performed action times. | 107 // Time source for performed action times. |
| 108 std::unique_ptr<base::TickClock> tick_clock_; | 108 std::unique_ptr<base::TickClock> tick_clock_; |
| 109 | 109 |
| 110 // Saves the most recent timestamp that powerd is resuming from suspend, | 110 // Saves the most recent timestamp that powerd is resuming from suspend, |
| 111 // updated in SuspendDone(). | 111 // updated in SuspendDone(). |
| 112 base::TimeTicks last_resume_time_; | 112 base::TimeTicks last_resume_time_; |
| 113 | 113 |
| 114 // True if power button released should ignore forcing off display. | |
| 115 bool ignore_forcing_off_; | |
|
Daniel Erat
2016/12/05 17:26:00
this variable name is pretty vague. how about inve
Qiang(Joe) Xu
2016/12/05 19:33:58
Done.
| |
| 116 | |
| 114 // Started when the tablet power button is pressed and stopped when it's | 117 // Started when the tablet power button is pressed and stopped when it's |
| 115 // released. Runs OnShutdownTimeout() to start shutdown. | 118 // released. Runs OnShutdownTimeout() to start shutdown. |
| 116 base::OneShotTimer shutdown_timer_; | 119 base::OneShotTimer shutdown_timer_; |
| 117 | 120 |
| 118 LockStateController* controller_; // Not owned. | 121 LockStateController* controller_; // Not owned. |
| 119 | 122 |
| 120 base::WeakPtrFactory<TabletPowerButtonController> weak_ptr_factory_; | 123 base::WeakPtrFactory<TabletPowerButtonController> weak_ptr_factory_; |
| 121 | 124 |
| 122 DISALLOW_COPY_AND_ASSIGN(TabletPowerButtonController); | 125 DISALLOW_COPY_AND_ASSIGN(TabletPowerButtonController); |
| 123 }; | 126 }; |
| 124 | 127 |
| 125 } // namespace ash | 128 } // namespace ash |
| 126 | 129 |
| 127 #endif // ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_ | 130 #endif // ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_ |
| OLD | NEW |