OLD | NEW |
1 // Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium OS 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 POWER_MANAGER_BACKLIGHT_CONTROLLER_H_ | 5 #ifndef POWER_MANAGER_BACKLIGHT_CONTROLLER_H_ |
6 #define POWER_MANAGER_BACKLIGHT_CONTROLLER_H_ | 6 #define POWER_MANAGER_BACKLIGHT_CONTROLLER_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 | 9 |
10 #include "power_manager/backlight_interface.h" | 10 #include "power_manager/backlight_interface.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // by other programs to our local view. Return true if the brightness | 91 // by other programs to our local view. Return true if the brightness |
92 // has not been modified by other programs; return false otherwise. | 92 // has not been modified by other programs; return false otherwise. |
93 bool ReadBrightness(); | 93 bool ReadBrightness(); |
94 | 94 |
95 // Write brightness based on current settings. | 95 // Write brightness based on current settings. |
96 // Returns true if the brightness was changed and false otherwise. | 96 // Returns true if the brightness was changed and false otherwise. |
97 bool WriteBrightness(); | 97 bool WriteBrightness(); |
98 | 98 |
99 void SetBrightnessToZero(); | 99 void SetBrightnessToZero(); |
100 | 100 |
101 // Turn off the display if the backlight has been turned off. | 101 // Indicates whether the display should be turned off based on the current |
102 SIGNAL_CALLBACK_0(BacklightController, gboolean, DisplayOffWhenBacklightOff); | 102 // power state. |
| 103 SIGNAL_CALLBACK_0(BacklightController, void, TurnScreenOff); |
103 | 104 |
104 // Backlight used for dimming. Non-owned. | 105 // Backlight used for dimming. Non-owned. |
105 BacklightInterface* backlight_; | 106 BacklightInterface* backlight_; |
106 | 107 |
107 // Interface for saving preferences. Non-owned. | 108 // Interface for saving preferences. Non-owned. |
108 PowerPrefsInterface* prefs_; | 109 PowerPrefsInterface* prefs_; |
109 | 110 |
110 // Light sensor we need to enable/disable on power events. Non-owned. | 111 // Light sensor we need to enable/disable on power events. Non-owned. |
111 AmbientLightSensor* light_sensor_; | 112 AmbientLightSensor* light_sensor_; |
112 | 113 |
(...skipping 28 matching lines...) Expand all Loading... |
141 | 142 |
142 // Flag is set if a backlight device exists. | 143 // Flag is set if a backlight device exists. |
143 bool is_initialized_; | 144 bool is_initialized_; |
144 | 145 |
145 DISALLOW_COPY_AND_ASSIGN(BacklightController); | 146 DISALLOW_COPY_AND_ASSIGN(BacklightController); |
146 }; | 147 }; |
147 | 148 |
148 } // namespace power_manager | 149 } // namespace power_manager |
149 | 150 |
150 #endif // POWER_MANAGER_BACKLIGHT_CONTROLLER_H_ | 151 #endif // POWER_MANAGER_BACKLIGHT_CONTROLLER_H_ |
OLD | NEW |