OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chromeos/dbus/fake_power_manager_client.h" | 5 #include "chromeos/dbus/fake_power_manager_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "chromeos/dbus/power_manager/policy.pb.h" | |
11 | 10 |
12 namespace chromeos { | 11 namespace chromeos { |
13 | 12 |
14 FakePowerManagerClient::FakePowerManagerClient() | 13 FakePowerManagerClient::FakePowerManagerClient() |
15 : num_request_restart_calls_(0), | 14 : num_request_restart_calls_(0), |
16 num_request_shutdown_calls_(0), | 15 num_request_shutdown_calls_(0), |
17 num_set_policy_calls_(0), | 16 num_set_policy_calls_(0), |
18 num_set_is_projecting_calls_(0), | 17 num_set_is_projecting_calls_(0), |
19 num_pending_suspend_readiness_callbacks_(0), | 18 num_pending_suspend_readiness_callbacks_(0), |
20 is_projecting_(false) { | 19 is_projecting_(false) { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 PowerButtonEventReceived(down, timestamp)); | 129 PowerButtonEventReceived(down, timestamp)); |
131 } | 130 } |
132 | 131 |
133 void FakePowerManagerClient::HandleSuspendReadiness() { | 132 void FakePowerManagerClient::HandleSuspendReadiness() { |
134 CHECK(num_pending_suspend_readiness_callbacks_ > 0); | 133 CHECK(num_pending_suspend_readiness_callbacks_ > 0); |
135 | 134 |
136 --num_pending_suspend_readiness_callbacks_; | 135 --num_pending_suspend_readiness_callbacks_; |
137 } | 136 } |
138 | 137 |
139 } // namespace chromeos | 138 } // namespace chromeos |
OLD | NEW |