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/location.h" | 9 #include "base/location.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 | 12 |
13 namespace chromeos { | 13 namespace chromeos { |
14 | 14 |
15 namespace { | 15 namespace { |
16 // Minimum power for a USB power source to be classified as AC. | 16 // Minimum power for a USB power source to be classified as AC. |
17 const double kUsbMinAcWatts = 24; | 17 const double kUsbMinAcWatts = 24; |
18 } | 18 } |
19 | 19 |
20 FakePowerManagerClient::FakePowerManagerClient() | 20 FakePowerManagerClient::FakePowerManagerClient() |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 FOR_EACH_OBSERVER(Observer, observers_, PowerChanged(props_)); | 178 FOR_EACH_OBSERVER(Observer, observers_, PowerChanged(props_)); |
179 } | 179 } |
180 | 180 |
181 void FakePowerManagerClient::HandleSuspendReadiness() { | 181 void FakePowerManagerClient::HandleSuspendReadiness() { |
182 CHECK(num_pending_suspend_readiness_callbacks_ > 0); | 182 CHECK(num_pending_suspend_readiness_callbacks_ > 0); |
183 | 183 |
184 --num_pending_suspend_readiness_callbacks_; | 184 --num_pending_suspend_readiness_callbacks_; |
185 } | 185 } |
186 | 186 |
187 } // namespace chromeos | 187 } // namespace chromeos |
OLD | NEW |