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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // |forced_off|. | 83 // |forced_off|. |
84 void SetDisplayForcedOff(bool forced_off); | 84 void SetDisplayForcedOff(bool forced_off); |
85 | 85 |
86 // Sends a request to powerd to get the backlights forced off state so that | 86 // Sends a request to powerd to get the backlights forced off state so that |
87 // |backlights_forced_off_| can be initialized. | 87 // |backlights_forced_off_| can be initialized. |
88 void GetInitialBacklightsForcedOff(); | 88 void GetInitialBacklightsForcedOff(); |
89 | 89 |
90 // Initializes |backlights_forced_off_|. | 90 // Initializes |backlights_forced_off_|. |
91 void OnGotInitialBacklightsForcedOff(bool is_forced_off); | 91 void OnGotInitialBacklightsForcedOff(bool is_forced_off); |
92 | 92 |
| 93 // Enables or disables the touchscreen, also writing its state to a pref in |
| 94 // local state. The touchscreen is disabled when backlights are forced off. |
| 95 void UpdateTouchscreenStatus(); |
| 96 |
93 // Starts |shutdown_timer_| when the power button is pressed while in | 97 // Starts |shutdown_timer_| when the power button is pressed while in |
94 // tablet mode. | 98 // tablet mode. |
95 void StartShutdownTimer(); | 99 void StartShutdownTimer(); |
96 | 100 |
97 // Called by |shutdown_timer_| to start the pre-shutdown animation. | 101 // Called by |shutdown_timer_| to start the pre-shutdown animation. |
98 void OnShutdownTimeout(); | 102 void OnShutdownTimeout(); |
99 | 103 |
100 // Locks the screen if the "require password to wake from sleep" pref is set | 104 // Locks the screen if the "require password to wake from sleep" pref is set |
101 // and locking is possible. | 105 // and locking is possible. |
102 void LockScreenIfRequired(); | 106 void LockScreenIfRequired(); |
(...skipping 27 matching lines...) Expand all Loading... |
130 LockStateController* controller_; // Not owned. | 134 LockStateController* controller_; // Not owned. |
131 | 135 |
132 base::WeakPtrFactory<TabletPowerButtonController> weak_ptr_factory_; | 136 base::WeakPtrFactory<TabletPowerButtonController> weak_ptr_factory_; |
133 | 137 |
134 DISALLOW_COPY_AND_ASSIGN(TabletPowerButtonController); | 138 DISALLOW_COPY_AND_ASSIGN(TabletPowerButtonController); |
135 }; | 139 }; |
136 | 140 |
137 } // namespace ash | 141 } // namespace ash |
138 | 142 |
139 #endif // ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_ | 143 #endif // ASH_SYSTEM_CHROMEOS_POWER_TABLET_POWER_BUTTON_CONTROLLER_H_ |
OLD | NEW |