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

Unified Diff: chromeos/dbus/fake_power_manager_client.cc

Issue 2296003002: ABANDONED: chromeos: Resume displays when suspend is cancelled. (Closed)
Patch Set: fix comment Created 4 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/dbus/fake_power_manager_client.h ('k') | ui/display/chromeos/display_configurator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_power_manager_client.cc
diff --git a/chromeos/dbus/fake_power_manager_client.cc b/chromeos/dbus/fake_power_manager_client.cc
index dcb82fac20dd48af9a34d86a0bdd10d2a857279a..504cf4f7c944154aa5c1787abee695237519f33e 100644
--- a/chromeos/dbus/fake_power_manager_client.cc
+++ b/chromeos/dbus/fake_power_manager_client.cc
@@ -136,7 +136,6 @@ void FakePowerManagerClient::SetPowerSource(const std::string& id) {
base::Closure FakePowerManagerClient::GetSuspendReadinessCallback() {
++num_pending_suspend_readiness_callbacks_;
-
return base::Bind(&FakePowerManagerClient::HandleSuspendReadiness,
base::Unretained(this));
}
@@ -145,6 +144,19 @@ int FakePowerManagerClient::GetNumPendingSuspendReadinessCallbacks() {
return num_pending_suspend_readiness_callbacks_;
}
+void FakePowerManagerClient::Reset() {
+ observers_.Clear();
+ policy_ = power_manager::PowerManagementPolicy();
+ props_ = power_manager::PowerSupplyProperties();
+ num_request_restart_calls_ = 0;
+ num_request_shutdown_calls_ = 0;
+ num_set_policy_calls_ = 0;
+ num_set_is_projecting_calls_ = 0;
+ num_pending_suspend_readiness_callbacks_ = 0;
+ is_projecting_ = false;
+ video_activity_reports_.clear();
+}
+
bool FakePowerManagerClient::PopVideoActivityReport() {
CHECK(!video_activity_reports_.empty());
bool fullscreen = video_activity_reports_.front();
« no previous file with comments | « chromeos/dbus/fake_power_manager_client.h ('k') | ui/display/chromeos/display_configurator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698