OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 bool battery_is_present; | 23 bool battery_is_present; |
24 bool battery_is_full; | 24 bool battery_is_full; |
25 | 25 |
26 // Time in seconds until the battery is empty or full, 0 for unknown. | 26 // Time in seconds until the battery is empty or full, 0 for unknown. |
27 int64 battery_seconds_to_empty; | 27 int64 battery_seconds_to_empty; |
28 int64 battery_seconds_to_full; | 28 int64 battery_seconds_to_full; |
29 | 29 |
30 double battery_percentage; | 30 double battery_percentage; |
31 | 31 |
32 PowerSupplyStatus(); | 32 PowerSupplyStatus(); |
33 const std::string& ToString() const; | 33 std::string ToString() const; |
34 }; | 34 }; |
35 | 35 |
36 // Callback used for processing the idle time. The int64 param is the number of | 36 // Callback used for processing the idle time. The int64 param is the number of |
37 // seconds the user has been idle. | 37 // seconds the user has been idle. |
38 typedef base::Callback<void(int64)> CalculateIdleTimeCallback; | 38 typedef base::Callback<void(int64)> CalculateIdleTimeCallback; |
39 | 39 |
40 // PowerManagerClient is used to communicate with the power manager. | 40 // PowerManagerClient is used to communicate with the power manager. |
41 class PowerManagerClient { | 41 class PowerManagerClient { |
42 public: | 42 public: |
43 // Interface for observing changes from the power manager. | 43 // Interface for observing changes from the power manager. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Create() should be used instead. | 87 // Create() should be used instead. |
88 PowerManagerClient(); | 88 PowerManagerClient(); |
89 | 89 |
90 private: | 90 private: |
91 DISALLOW_COPY_AND_ASSIGN(PowerManagerClient); | 91 DISALLOW_COPY_AND_ASSIGN(PowerManagerClient); |
92 }; | 92 }; |
93 | 93 |
94 } // namespace chromeos | 94 } // namespace chromeos |
95 | 95 |
96 #endif // CHROME_BROWSER_CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ | 96 #endif // CHROME_BROWSER_CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ |
OLD | NEW |