Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3076)

Unified Diff: base/system_monitor/system_monitor.h

Issue 10703120: Adds an iOS implementation of base::SystemMonitor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Review2 Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/base.gypi ('k') | base/system_monitor/system_monitor_ios.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/system_monitor/system_monitor.h
diff --git a/base/system_monitor/system_monitor.h b/base/system_monitor/system_monitor.h
index d960fa2d24e735df4e3f8f04775233e6c0575d4a..a070755ad76fbd68c509344ba46d1b0b7f8baa9d 100644
--- a/base/system_monitor/system_monitor.h
+++ b/base/system_monitor/system_monitor.h
@@ -27,10 +27,14 @@
#include "base/timer.h"
#endif // defined(ENABLE_BATTERY_MONITORING)
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) && !defined(OS_IOS)
#include <IOKit/pwr_mgt/IOPMLib.h>
#include <IOKit/IOMessage.h>
-#endif // OS_MACOSX
+#endif // OS_MACOSX && !OS_IOS
+
+#if defined(OS_IOS)
+#include <objc/runtime.h>
+#endif // OS_IOS
class FilePath;
@@ -65,8 +69,12 @@ class BASE_EXPORT SystemMonitor {
//
// This function must be called before instantiating an instance of the class
// and before the Sandbox is initialized.
+#if !defined(OS_IOS)
static void AllocateSystemIOPorts();
-#endif
+#else
+ static void AllocateSystemIOPorts() {}
+#endif // OS_IOS
+#endif // OS_MACOSX
//
// Power-related APIs
@@ -189,6 +197,11 @@ class BASE_EXPORT SystemMonitor {
base::OneShotTimer<SystemMonitor> delayed_battery_check_;
#endif
+#if defined(OS_IOS)
+ // Holds pointers to system event notification observers.
+ std::vector<id> notification_observers_;
+#endif
+
MediaDeviceMap media_device_map_;
DISALLOW_COPY_AND_ASSIGN(SystemMonitor);
« no previous file with comments | « base/base.gypi ('k') | base/system_monitor/system_monitor_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698