| 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.h" | 5 #include "base/power_monitor/power_monitor.h" |
| 6 | 6 |
| 7 #include "base/time.h" | 7 #include "base/time/time.h" |
| 8 | 8 |
| 9 namespace base { | 9 namespace base { |
| 10 | 10 |
| 11 static PowerMonitor* g_power_monitor = NULL; | 11 static PowerMonitor* g_power_monitor = NULL; |
| 12 | 12 |
| 13 #if defined(ENABLE_BATTERY_MONITORING) | 13 #if defined(ENABLE_BATTERY_MONITORING) |
| 14 // The amount of time (in ms) to wait before running the initial | 14 // The amount of time (in ms) to wait before running the initial |
| 15 // battery check. | 15 // battery check. |
| 16 static int kDelayedBatteryCheckMs = 10 * 1000; | 16 static int kDelayedBatteryCheckMs = 10 * 1000; |
| 17 #endif // defined(ENABLE_BATTERY_MONITORING) | 17 #endif // defined(ENABLE_BATTERY_MONITORING) |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 DVLOG(1) << "Power Suspending"; | 97 DVLOG(1) << "Power Suspending"; |
| 98 observers_->Notify(&PowerObserver::OnSuspend); | 98 observers_->Notify(&PowerObserver::OnSuspend); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void PowerMonitor::NotifyResume() { | 101 void PowerMonitor::NotifyResume() { |
| 102 DVLOG(1) << "Power Resuming"; | 102 DVLOG(1) << "Power Resuming"; |
| 103 observers_->Notify(&PowerObserver::OnResume); | 103 observers_->Notify(&PowerObserver::OnResume); |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace base | 106 } // namespace base |
| OLD | NEW |