summaryrefslogtreecommitdiffstats
path: root/app/system_monitor.h
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-24 20:16:03 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-24 20:16:03 +0000
commitfe0f58fddabd7829d62d1174feaba725ab69e922 (patch)
treec842db924390f3af2bc469a007f7323894432f8d /app/system_monitor.h
parentb45d80311bc50f2d6251f2fd38feaa53f5c25276 (diff)
downloadchromium_src-fe0f58fddabd7829d62d1174feaba725ab69e922.zip
chromium_src-fe0f58fddabd7829d62d1174feaba725ab69e922.tar.gz
chromium_src-fe0f58fddabd7829d62d1174feaba725ab69e922.tar.bz2
Monitor sleep/wake on Mac. Should fix some networking issues arising after sleep.
BUG=29669 TEST=turn logging up; see logging about power being suspended/resumed when Mac sleeps/awakes Review URL: http://codereview.chromium.org/5310005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67301 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/system_monitor.h')
-rw-r--r--app/system_monitor.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/app/system_monitor.h b/app/system_monitor.h
index e5371ac..1ce89e3 100644
--- a/app/system_monitor.h
+++ b/app/system_monitor.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -21,6 +21,14 @@
#include "base/timer.h"
#endif // defined(ENABLE_BATTERY_MONITORING)
+#if defined(OS_MACOSX)
+#ifdef __OBJC__
+@class SystemMonitorBridge;
+#else
+class SystemMonitorBridge;
+#endif
+#endif
+
// Class for monitoring various system-related subsystems
// such as power management, network status, etc.
// TODO(mbelshe): Add support beyond just power management.
@@ -94,6 +102,11 @@ class SystemMonitor {
void ProcessPowerMessage(PowerEvent event_id);
private:
+#if defined(OS_MACOSX)
+ void PlatformInit();
+ void PlatformDestroy();
+#endif
+
// Platform-specific method to check whether the system is currently
// running on battery power. Returns true if running on batteries,
// false otherwise.
@@ -116,6 +129,10 @@ class SystemMonitor {
base::OneShotTimer<SystemMonitor> delayed_battery_check_;
#endif
+#if defined(OS_MACOSX)
+ SystemMonitorBridge* system_monitor_bridge_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(SystemMonitor);
};