| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 #endif // OS_WIN | 73 #endif // OS_WIN |
| 74 | 74 |
| 75 #if defined(OS_MACOSX) | 75 #if defined(OS_MACOSX) |
| 76 void PlatformInit(); | 76 void PlatformInit(); |
| 77 void PlatformDestroy(); | 77 void PlatformDestroy(); |
| 78 #endif | 78 #endif |
| 79 | 79 |
| 80 // Platform-specific method to check whether the system is currently | 80 // Platform-specific method to check whether the system is currently |
| 81 // running on battery power. Returns true if running on batteries, | 81 // running on battery power. Returns true if running on batteries, |
| 82 // false otherwise. | 82 // false otherwise. |
| 83 virtual bool IsOnBatteryPowerImpl() OVERRIDE; | 83 bool IsOnBatteryPowerImpl() override; |
| 84 | 84 |
| 85 // Checks the battery status and notifies observers if the battery | 85 // Checks the battery status and notifies observers if the battery |
| 86 // status has changed. | 86 // status has changed. |
| 87 void BatteryCheck(); | 87 void BatteryCheck(); |
| 88 | 88 |
| 89 #if defined(OS_IOS) | 89 #if defined(OS_IOS) |
| 90 // Holds pointers to system event notification observers. | 90 // Holds pointers to system event notification observers. |
| 91 std::vector<id> notification_observers_; | 91 std::vector<id> notification_observers_; |
| 92 #endif | 92 #endif |
| 93 | 93 |
| 94 #if defined(ENABLE_BATTERY_MONITORING) | 94 #if defined(ENABLE_BATTERY_MONITORING) |
| 95 base::OneShotTimer<PowerMonitorDeviceSource> delayed_battery_check_; | 95 base::OneShotTimer<PowerMonitorDeviceSource> delayed_battery_check_; |
| 96 #endif | 96 #endif |
| 97 | 97 |
| 98 #if defined(OS_WIN) | 98 #if defined(OS_WIN) |
| 99 PowerMessageWindow power_message_window_; | 99 PowerMessageWindow power_message_window_; |
| 100 #endif | 100 #endif |
| 101 | 101 |
| 102 DISALLOW_COPY_AND_ASSIGN(PowerMonitorDeviceSource); | 102 DISALLOW_COPY_AND_ASSIGN(PowerMonitorDeviceSource); |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 } // namespace base | 105 } // namespace base |
| 106 | 106 |
| 107 #endif // BASE_POWER_MONITOR_POWER_MONITOR_DEVICE_SOURCE_H_ | 107 #endif // BASE_POWER_MONITOR_POWER_MONITOR_DEVICE_SOURCE_H_ |
| OLD | NEW |