Index: base/message_loop/message_pump_default.h |
diff --git a/base/message_loop/message_pump_default.h b/base/message_loop/message_pump_default.h |
index 19e720013fd69ca635bfa9801d114236562d83cc..581f308a9de6fc7da523d822e12bd1ac4904080c 100644 |
--- a/base/message_loop/message_pump_default.h |
+++ b/base/message_loop/message_pump_default.h |
@@ -7,6 +7,8 @@ |
#include "base/base_export.h" |
#include "base/message_loop/message_pump.h" |
+#include "base/synchronization/condition_variable.h" |
+#include "base/synchronization/lock.h" |
#include "base/synchronization/waitable_event.h" |
#include "base/time/time.h" |
@@ -24,11 +26,23 @@ class BASE_EXPORT MessagePumpDefault : public MessagePump { |
virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE; |
private: |
+ void Wait(); |
+ void TimedWait(const TimeDelta& max_time); |
+ void Signal(); |
+ |
// This flag is set to false when Run should return. |
bool keep_running_; |
+#if defined(OS_WIN) |
// Used to sleep until there is more work to do. |
WaitableEvent event_; |
+#elif defined(OS_POSIX) |
+ Lock lock_; // Protects needs_wake_up_ and cv_; |
+ bool needs_wake_up_; |
+ ConditionVariable cv_; |
+#else |
+#error Need implementation for your platform |
+#endif |
// The time at which we should call DoDelayedWork. |
TimeTicks delayed_work_time_; |