Chromium Code Reviews| Index: chrome/browser/chromeos/dbus/power_manager_client.h |
| diff --git a/chrome/browser/chromeos/dbus/power_manager_client.h b/chrome/browser/chromeos/dbus/power_manager_client.h |
| index 11ecf90dac6c65f750ebb0c7f35544c30a34a427..b7d8bf0f5e7a1e64aba7c7c36d8b99a4adaf995d 100644 |
| --- a/chrome/browser/chromeos/dbus/power_manager_client.h |
| +++ b/chrome/browser/chromeos/dbus/power_manager_client.h |
| @@ -5,6 +5,7 @@ |
| #ifndef CHROME_BROWSER_CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ |
| #define CHROME_BROWSER_CHROMEOS_DBUS_POWER_MANAGER_CLIENT_H_ |
| +#include "base/callback.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/observer_list.h" |
| @@ -36,6 +37,8 @@ struct PowerSupplyStatus { |
| const std::string& ToString() const; |
| }; |
| +typedef base::Callback<void(int64_t)> CalculateIdleTimeCallback; |
|
satorux1
2011/11/15 00:57:42
Please add some comment about the parameter: int64
Simon Que
2011/11/15 01:29:38
Done.
|
| + |
| // PowerManagerClient is used to communicate with the power manager. |
| class PowerManagerClient { |
| public: |
| @@ -72,6 +75,10 @@ class PowerManagerClient { |
| // Requests shutdown of the system. |
| virtual void RequestShutdown() = 0; |
| + // Calculates idle time asynchronously. If it encounters some error, |
| + // it returns -1. |
|
satorux1
2011/11/15 00:57:42
The comment is misleading. It's a void function. Y
Simon Que
2011/11/15 01:29:38
Done.
|
| + virtual void CalculateIdleTime(CalculateIdleTimeCallback* callback) = 0; |
|
satorux1
2011/11/15 00:57:42
This shouldn't have to be a pointer. Please remove
Simon Que
2011/11/15 01:29:38
Done.
|
| + |
| // Creates the instance. |
| static PowerManagerClient* Create(dbus::Bus* bus); |