OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 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_DAEMON_H_ | 5 #ifndef POWER_DAEMON_H_ |
6 #define POWER_DAEMON_H_ | 6 #define POWER_DAEMON_H_ |
7 | 7 |
8 #include <dbus/dbus-glib-lowlevel.h> | 8 #include <dbus/dbus-glib-lowlevel.h> |
9 #include <gtest/gtest_prod.h> // for FRIEND_TEST | 9 #include <gtest/gtest_prod.h> // for FRIEND_TEST |
10 | 10 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 static gboolean CleanShutdownTimedOut(gpointer data); | 136 static gboolean CleanShutdownTimedOut(gpointer data); |
137 | 137 |
138 void Shutdown(); | 138 void Shutdown(); |
139 void Suspend(); | 139 void Suspend(); |
140 | 140 |
141 // Callback for Inotify of Preference directory changes. | 141 // Callback for Inotify of Preference directory changes. |
142 static gboolean PrefChangeHandler(const char* name, int wd, | 142 static gboolean PrefChangeHandler(const char* name, int wd, |
143 unsigned int mask, | 143 unsigned int mask, |
144 gpointer data); | 144 gpointer data); |
145 | 145 |
| 146 // Send a D-Bus signal announcing that the screen brightness has been set to |
| 147 // |level| (a percentage between 0 and 100). |
| 148 void SendBrightnessChangedSignal(int level); |
| 149 |
146 // Generates UMA metrics on every idle event. | 150 // Generates UMA metrics on every idle event. |
147 void GenerateMetricsOnIdleEvent(bool is_idle, int64 idle_time_ms); | 151 void GenerateMetricsOnIdleEvent(bool is_idle, int64 idle_time_ms); |
148 | 152 |
149 // Generates UMA metrics on every power event based on the current | 153 // Generates UMA metrics on every power event based on the current |
150 // power status. | 154 // power status. |
151 void GenerateMetricsOnPowerEvent(const chromeos::PowerStatus& info); | 155 void GenerateMetricsOnPowerEvent(const chromeos::PowerStatus& info); |
152 | 156 |
153 // Generates UMA metrics about the current backlight level. | 157 // Generates UMA metrics about the current backlight level. |
154 // Always returns true. | 158 // Always returns true. |
155 static gboolean GenerateBacklightLevelMetric(gpointer data); | 159 static gboolean GenerateBacklightLevelMetric(gpointer data); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 KeyCode key_brightness_up_; | 251 KeyCode key_brightness_up_; |
248 KeyCode key_brightness_down_; | 252 KeyCode key_brightness_down_; |
249 KeyCode key_power_off_; | 253 KeyCode key_power_off_; |
250 KeyCode key_f6_; | 254 KeyCode key_f6_; |
251 KeyCode key_f7_; | 255 KeyCode key_f7_; |
252 }; | 256 }; |
253 | 257 |
254 } // namespace power_manager | 258 } // namespace power_manager |
255 | 259 |
256 #endif // POWER_DAEMON_H_ | 260 #endif // POWER_DAEMON_H_ |
OLD | NEW |