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

Unified Diff: chromeos/dbus/fake_power_manager_client.h

Issue 23484021: Implement SendSuspendImminent() and SendSuspendStateChanged() of FakePowerManagerClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months 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
« no previous file with comments | « no previous file | chromeos/dbus/fake_power_manager_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_power_manager_client.h
diff --git a/chromeos/dbus/fake_power_manager_client.h b/chromeos/dbus/fake_power_manager_client.h
index 001d783e1daa3a25c0c457d2b317b40ee8b9496c..ea4fa38df8199a5600f74fe0f1c5736a49bc088d 100644
--- a/chromeos/dbus/fake_power_manager_client.h
+++ b/chromeos/dbus/fake_power_manager_client.h
@@ -7,7 +7,11 @@
#include <string>
+#include "base/basictypes.h"
+#include "base/observer_list.h"
+#include "base/time/time.h"
#include "chromeos/dbus/power_manager/policy.pb.h"
+#include "chromeos/dbus/power_manager/suspend.pb.h"
#include "chromeos/dbus/power_manager_client.h"
namespace chromeos {
@@ -52,9 +56,19 @@ class FakePowerManagerClient : public PowerManagerClient {
return request_restart_call_count_;
}
+ // Emulates that the dbus server sends a message "SuspendImminent" to the
+ // client.
+ void SendSuspendImminent();
+
+ // Emulates that the dbus server sends a message "SuspendStateChanged" to the
+ // client.
+ void SendSuspendStateChanged(
+ const power_manager::SuspendState& suspend_state);
+
private:
power_manager::PowerManagementPolicy policy_;
-
+ base::Time last_suspend_wall_time_;
+ ObserverList<Observer> observers_;
int request_restart_call_count_;
DISALLOW_COPY_AND_ASSIGN(FakePowerManagerClient);
« no previous file with comments | « no previous file | chromeos/dbus/fake_power_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698