OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "base/power_monitor/power_monitor_device_source.h" | 5 #include "base/power_monitor/power_monitor_device_source.h" |
6 | 6 |
7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 8 #include "build/build_config.h" |
8 | 9 |
9 namespace base { | 10 namespace base { |
10 | 11 |
11 #if defined(ENABLE_BATTERY_MONITORING) | 12 #if defined(ENABLE_BATTERY_MONITORING) |
12 // The amount of time (in ms) to wait before running the initial | 13 // The amount of time (in ms) to wait before running the initial |
13 // battery check. | 14 // battery check. |
14 static int kDelayedBatteryCheckMs = 10 * 1000; | 15 static int kDelayedBatteryCheckMs = 10 * 1000; |
15 #endif // defined(ENABLE_BATTERY_MONITORING) | 16 #endif // defined(ENABLE_BATTERY_MONITORING) |
16 | 17 |
17 PowerMonitorDeviceSource::PowerMonitorDeviceSource() { | 18 PowerMonitorDeviceSource::PowerMonitorDeviceSource() { |
(...skipping 12 matching lines...) Expand all Loading... |
30 #if defined(OS_MACOSX) | 31 #if defined(OS_MACOSX) |
31 PlatformDestroy(); | 32 PlatformDestroy(); |
32 #endif | 33 #endif |
33 } | 34 } |
34 | 35 |
35 void PowerMonitorDeviceSource::BatteryCheck() { | 36 void PowerMonitorDeviceSource::BatteryCheck() { |
36 ProcessPowerEvent(PowerMonitorSource::POWER_STATE_EVENT); | 37 ProcessPowerEvent(PowerMonitorSource::POWER_STATE_EVENT); |
37 } | 38 } |
38 | 39 |
39 } // namespace base | 40 } // namespace base |
OLD | NEW |