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