Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4134)

Unified Diff: chrome/browser/chromeos/dbus/power_manager_client.h

Issue 8566024: chromeos: call GetIdleTime from power manager client (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698