Index: base/message_loop.h |
=================================================================== |
--- base/message_loop.h (revision 90809) |
+++ base/message_loop.h (working copy) |
@@ -24,9 +24,10 @@ |
// We need this to declare base::MessagePumpWin::Dispatcher, which we should |
// really just eliminate. |
#include "base/message_pump_win.h" |
+#elif defined(OS_MACOSX) |
+#include "base/message_pump_mac.h" |
#elif defined(OS_POSIX) |
#include "base/message_pump_libevent.h" |
-#if !defined(OS_MACOSX) |
#if defined(TOUCH_UI) |
#include "base/message_pump_x.h" |
#else |
@@ -34,7 +35,6 @@ |
#endif |
typedef struct _XDisplay Display; |
#endif |
-#endif |
namespace base { |
class Histogram; |
@@ -431,6 +431,10 @@ |
base::MessagePumpWin* pump_win() { |
return static_cast<base::MessagePumpWin*>(pump_.get()); |
} |
+#elif defined(OS_MACOSX) |
+ base::MessagePumpCFRunLoopBase* pump_mac() { |
+ return static_cast<base::MessagePumpCFRunLoopBase*>(pump_.get()); |
+ } |
#elif defined(OS_POSIX) |
base::MessagePumpLibevent* pump_libevent() { |
return static_cast<base::MessagePumpLibevent*>(pump_.get()); |
@@ -630,6 +634,17 @@ |
typedef base::MessagePumpForIO::IOHandler IOHandler; |
typedef base::MessagePumpForIO::IOContext IOContext; |
typedef base::MessagePumpForIO::IOObserver IOObserver; |
+#elif defined(OS_MACOSX) |
+ typedef base::MessagePumpCFRunLoopBase::Watcher Watcher; |
+ typedef base::MessagePumpCFRunLoopBase::FileDescriptorWatcher |
+ FileDescriptorWatcher; |
+ typedef base::MessagePumpCFRunLoopBase::IOObserver IOObserver; |
+ |
+ enum Mode { |
+ WATCH_READ = base::MessagePumpCFRunLoopBase::WATCH_READ, |
+ WATCH_WRITE = base::MessagePumpCFRunLoopBase::WATCH_WRITE, |
+ WATCH_READ_WRITE = base::MessagePumpCFRunLoopBase::WATCH_READ_WRITE |
+ }; |
#elif defined(OS_POSIX) |
typedef base::MessagePumpLibevent::Watcher Watcher; |
typedef base::MessagePumpLibevent::FileDescriptorWatcher |
@@ -641,7 +656,6 @@ |
WATCH_WRITE = base::MessagePumpLibevent::WATCH_WRITE, |
WATCH_READ_WRITE = base::MessagePumpLibevent::WATCH_READ_WRITE |
}; |
- |
#endif |
MessageLoopForIO() : MessageLoop(TYPE_IO) { |
@@ -673,6 +687,18 @@ |
return static_cast<base::MessagePumpForIO*>(pump_.get()); |
} |
+#elif defined(OS_MACOSX) |
+ // Please see MessagePumpCFRunLoopBase for definition. |
+ bool WatchFileDescriptor(int fd, |
+ bool persistent, |
+ Mode mode, |
+ FileDescriptorWatcher *controller, |
+ Watcher *delegate); |
+ |
+ private: |
+ base::MessagePumpCFRunLoopBase* pump_io() { |
+ return static_cast<base::MessagePumpCFRunLoopBase*>(pump_.get()); |
+ } |
#elif defined(OS_POSIX) |
// Please see MessagePumpLibevent for definition. |
bool WatchFileDescriptor(int fd, |