summaryrefslogtreecommitdiffstats
path: root/base/timer.h
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 21:27:02 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 21:27:02 +0000
commitee132adb94b58e7ea585b1fadf232aa60810ff1b (patch)
tree71f598a0ed4ea1d7d6e31f3ecf54eefdc4fd2e3b /base/timer.h
parent1671de4c8e8867be055ff22045afc1d9d946fc84 (diff)
downloadchromium_src-ee132adb94b58e7ea585b1fadf232aa60810ff1b.zip
chromium_src-ee132adb94b58e7ea585b1fadf232aa60810ff1b.tar.gz
chromium_src-ee132adb94b58e7ea585b1fadf232aa60810ff1b.tar.bz2
just some hopefully non-contentious stuff to get out of the way before doing the real MessageLoop changes.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@459 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/timer.h')
-rw-r--r--base/timer.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/base/timer.h b/base/timer.h
index 4374971..de22b64 100644
--- a/base/timer.h
+++ b/base/timer.h
@@ -31,7 +31,6 @@
#define BASE_TIMER_H_
#include <math.h>
-#include <windows.h>
#include <queue>
#include <vector>
@@ -39,6 +38,10 @@
#include "base/basictypes.h"
#include "base/time.h"
+#ifdef OS_WIN
+#include <windows.h>
+#endif // OS_WIN
+
// Timer/TimerManager are objects designed to help setting timers.
// Goals of TimerManager:
// - have only one Windows system timer for all app timer functionality
@@ -202,7 +205,7 @@ class TimerManager {
void set_use_broken_delay(bool use_broken_delay) {
use_broken_delay_ = use_broken_delay;
}
-#endif
+#endif // UNIT_TEST
protected:
// Peek at the timer which will fire soonest.
@@ -212,16 +215,18 @@ class TimerManager {
// Update our Windows WM_TIMER to match our most immediately pending timer.
void UpdateWindowsWmTimer();
+#ifdef OS_WIN
// Retrieve the Message Window that handles WM_TIMER messages from the
// system.
HWND GetMessageHWND();
+ HWND message_hwnd_;
+#endif // OS_WIN
+
TimerPQueue timers_;
bool use_broken_delay_;
- HWND message_hwnd_;
-
// Flag to enable/disable use of native timers.
bool use_native_timers_;