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

Unified Diff: chromeos/dbus/fake_power_manager_client.h

Issue 468393005: app_shell: Shut down in response to power button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 6 years, 4 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 | « chromeos/chromeos.gyp ('k') | 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 893448c4b6585e845037799c664ce698ffb67e22..f4b9af59b45a6978d0370ca647a628335312bf01 100644
--- a/chromeos/dbus/fake_power_manager_client.h
+++ b/chromeos/dbus/fake_power_manager_client.h
@@ -24,18 +24,13 @@ class FakePowerManagerClient : public PowerManagerClient {
virtual ~FakePowerManagerClient();
power_manager::PowerManagementPolicy& policy() { return policy_; }
- int num_request_restart_calls() const {
- return num_request_restart_calls_;
- }
- int num_set_policy_calls() const {
- return num_set_policy_calls_;
- }
+ int num_request_restart_calls() const { return num_request_restart_calls_; }
+ int num_request_shutdown_calls() const { return num_request_shutdown_calls_; }
+ int num_set_policy_calls() const { return num_set_policy_calls_; }
int num_set_is_projecting_calls() const {
return num_set_is_projecting_calls_;
}
- bool is_projecting() const {
- return is_projecting_;
- }
+ bool is_projecting() const { return is_projecting_; }
// PowerManagerClient overrides
virtual void Init(dbus::Bus* bus) OVERRIDE;
@@ -68,19 +63,19 @@ class FakePowerManagerClient : public PowerManagerClient {
void SendSuspendDone();
void SendDarkSuspendImminent();
+ // Notifies observers that the power button has been pressed or released.
+ void SendPowerButtonEvent(bool down, const base::TimeTicks& timestamp);
+
private:
ObserverList<Observer> observers_;
// Last policy passed to SetPolicy().
power_manager::PowerManagementPolicy policy_;
- // Number of times that RequestRestart() has been called.
+ // Number of times that various methods have been called.
int num_request_restart_calls_;
-
- // Number of times that SetPolicy() has been called.
+ int num_request_shutdown_calls_;
int num_set_policy_calls_;
-
- // Count the number of times SetIsProjecting() has been called.
int num_set_is_projecting_calls_;
// Last projecting state set in SetIsProjecting().
« no previous file with comments | « chromeos/chromeos.gyp ('k') | chromeos/dbus/fake_power_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698