| 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 #ifndef BASE_POWER_MONITOR_POWER_MONITOR_DEVICE_SOURCE_H_ | 5 #ifndef BASE_POWER_MONITOR_POWER_MONITOR_DEVICE_SOURCE_H_ |
| 6 #define BASE_POWER_MONITOR_POWER_MONITOR_DEVICE_SOURCE_H_ | 6 #define BASE_POWER_MONITOR_POWER_MONITOR_DEVICE_SOURCE_H_ |
| 7 | 7 |
| 8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 #endif // OS_WIN | 83 #endif // OS_WIN |
| 84 | 84 |
| 85 #if defined(OS_MACOSX) | 85 #if defined(OS_MACOSX) |
| 86 void PlatformInit(); | 86 void PlatformInit(); |
| 87 void PlatformDestroy(); | 87 void PlatformDestroy(); |
| 88 #endif | 88 #endif |
| 89 | 89 |
| 90 // Platform-specific method to check whether the system is currently | 90 // Platform-specific method to check whether the system is currently |
| 91 // running on battery power. Returns true if running on batteries, | 91 // running on battery power. Returns true if running on batteries, |
| 92 // false otherwise. | 92 // false otherwise. |
| 93 virtual bool IsOnBatteryPowerImpl() OVERRIDE; | 93 virtual bool IsOnBatteryPowerImpl() override; |
| 94 | 94 |
| 95 // Checks the battery status and notifies observers if the battery | 95 // Checks the battery status and notifies observers if the battery |
| 96 // status has changed. | 96 // status has changed. |
| 97 void BatteryCheck(); | 97 void BatteryCheck(); |
| 98 | 98 |
| 99 #if defined(OS_IOS) | 99 #if defined(OS_IOS) |
| 100 // Holds pointers to system event notification observers. | 100 // Holds pointers to system event notification observers. |
| 101 std::vector<id> notification_observers_; | 101 std::vector<id> notification_observers_; |
| 102 #endif | 102 #endif |
| 103 | 103 |
| 104 #if defined(ENABLE_BATTERY_MONITORING) | 104 #if defined(ENABLE_BATTERY_MONITORING) |
| 105 base::OneShotTimer<PowerMonitorDeviceSource> delayed_battery_check_; | 105 base::OneShotTimer<PowerMonitorDeviceSource> delayed_battery_check_; |
| 106 #endif | 106 #endif |
| 107 | 107 |
| 108 #if defined(OS_WIN) | 108 #if defined(OS_WIN) |
| 109 PowerMessageWindow power_message_window_; | 109 PowerMessageWindow power_message_window_; |
| 110 #endif | 110 #endif |
| 111 | 111 |
| 112 DISALLOW_COPY_AND_ASSIGN(PowerMonitorDeviceSource); | 112 DISALLOW_COPY_AND_ASSIGN(PowerMonitorDeviceSource); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 } // namespace base | 115 } // namespace base |
| 116 | 116 |
| 117 #endif // BASE_POWER_MONITOR_POWER_MONITOR_DEVICE_SOURCE_H_ | 117 #endif // BASE_POWER_MONITOR_POWER_MONITOR_DEVICE_SOURCE_H_ |
| OLD | NEW |