| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 APP_SYSTEM_MONITOR_H_ | 5 #ifndef UI_BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_ |
| 6 #define APP_SYSTEM_MONITOR_H_ | 6 #define UI_BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| 11 // Windows HiRes timers drain the battery faster so we need to know the battery | 11 // Windows HiRes timers drain the battery faster so we need to know the battery |
| 12 // status. This isn't true for other platforms. | 12 // status. This isn't true for other platforms. |
| 13 #if defined(OS_WIN) | 13 #if defined(OS_WIN) |
| 14 #define ENABLE_BATTERY_MONITORING 1 | 14 #define ENABLE_BATTERY_MONITORING 1 |
| 15 #else | 15 #else |
| 16 #undef ENABLE_BATTERY_MONITORING | 16 #undef ENABLE_BATTERY_MONITORING |
| 17 #endif // !OS_WIN | 17 #endif // !OS_WIN |
| 18 | 18 |
| 19 #include "base/observer_list_threadsafe.h" | 19 #include "base/observer_list_threadsafe.h" |
| 20 #if defined(ENABLE_BATTERY_MONITORING) | 20 #if defined(ENABLE_BATTERY_MONITORING) |
| 21 #include "base/timer.h" | 21 #include "base/timer.h" |
| 22 #endif // defined(ENABLE_BATTERY_MONITORING) | 22 #endif // defined(ENABLE_BATTERY_MONITORING) |
| 23 | 23 |
| 24 namespace ui { |
| 25 |
| 24 #if defined(OS_MACOSX) | 26 #if defined(OS_MACOSX) |
| 25 #ifdef __OBJC__ | 27 #ifdef __OBJC__ |
| 26 @class SystemMonitorBridge; | 28 @class SystemMonitorBridge; |
| 27 #else | 29 #else |
| 28 class SystemMonitorBridge; | 30 class SystemMonitorBridge; |
| 29 #endif | 31 #endif |
| 30 #endif | 32 #endif |
| 31 | 33 |
| 32 // Class for monitoring various system-related subsystems | 34 // Class for monitoring various system-related subsystems |
| 33 // such as power management, network status, etc. | 35 // such as power management, network status, etc. |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 base::OneShotTimer<SystemMonitor> delayed_battery_check_; | 131 base::OneShotTimer<SystemMonitor> delayed_battery_check_; |
| 130 #endif | 132 #endif |
| 131 | 133 |
| 132 #if defined(OS_MACOSX) | 134 #if defined(OS_MACOSX) |
| 133 SystemMonitorBridge* system_monitor_bridge_; | 135 SystemMonitorBridge* system_monitor_bridge_; |
| 134 #endif | 136 #endif |
| 135 | 137 |
| 136 DISALLOW_COPY_AND_ASSIGN(SystemMonitor); | 138 DISALLOW_COPY_AND_ASSIGN(SystemMonitor); |
| 137 }; | 139 }; |
| 138 | 140 |
| 139 #endif // APP_SYSTEM_MONITOR_H_ | 141 } // namespace ui |
| 142 |
| 143 #endif // UI_BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_ |
| OLD | NEW |