Index: base/message_loop.h |
diff --git a/base/message_loop.h b/base/message_loop.h |
index 74dfe659cc92292326a7c2e411ab19076b4ea763..8a5149409d1192204ef330adbfab8100dfbe33d1 100644 |
--- a/base/message_loop.h |
+++ b/base/message_loop.h |
@@ -26,6 +26,8 @@ |
// We need this to declare base::MessagePumpWin::Dispatcher, which we should |
// really just eliminate. |
#include "base/message_pump_win.h" |
+#elif defined(OS_IOS) |
+#include "base/message_pump_io_ios.h" |
#elif defined(OS_POSIX) |
#include "base/message_pump_libevent.h" |
#if !defined(OS_MACOSX) && !defined(OS_ANDROID) |
@@ -388,7 +390,7 @@ class BASE_EXPORT MessageLoop : public base::MessagePump::Delegate { |
base::MessagePumpWin* pump_win() { |
return static_cast<base::MessagePumpWin*>(pump_.get()); |
} |
-#elif defined(OS_POSIX) |
+#elif defined(OS_POSIX) && !defined(OS_IOS) |
base::MessagePumpLibevent* pump_libevent() { |
return static_cast<base::MessagePumpLibevent*>(pump_.get()); |
} |
@@ -613,6 +615,17 @@ class BASE_EXPORT MessageLoopForIO : public MessageLoop { |
typedef base::MessagePumpForIO::IOHandler IOHandler; |
typedef base::MessagePumpForIO::IOContext IOContext; |
typedef base::MessagePumpForIO::IOObserver IOObserver; |
+#elif defined(OS_IOS) |
+ typedef base::MessagePumpIOSForIO::Watcher Watcher; |
+ typedef base::MessagePumpIOSForIO::FileDescriptorWatcher |
+ FileDescriptorWatcher; |
+ typedef base::MessagePumpIOSForIO::IOObserver IOObserver; |
+ |
+ enum Mode { |
+ WATCH_READ = base::MessagePumpIOSForIO::WATCH_READ, |
+ WATCH_WRITE = base::MessagePumpIOSForIO::WATCH_WRITE, |
+ WATCH_READ_WRITE = WATCH_READ | WATCH_WRITE |
+ }; |
#elif defined(OS_POSIX) |
typedef base::MessagePumpLibevent::Watcher Watcher; |
typedef base::MessagePumpLibevent::FileDescriptorWatcher |
@@ -622,7 +635,7 @@ class BASE_EXPORT MessageLoopForIO : public MessageLoop { |
enum Mode { |
WATCH_READ = base::MessagePumpLibevent::WATCH_READ, |
WATCH_WRITE = base::MessagePumpLibevent::WATCH_WRITE, |
- WATCH_READ_WRITE = base::MessagePumpLibevent::WATCH_READ_WRITE |
+ WATCH_READ_WRITE = WATCH_READ | WATCH_WRITE |
}; |
#endif |
@@ -657,6 +670,19 @@ class BASE_EXPORT MessageLoopForIO : public MessageLoop { |
return static_cast<base::MessagePumpForIO*>(pump_.get()); |
} |
+#elif defined(OS_IOS) |
+ // Please see MessagePumpIOSForIO for definition. |
+ bool WatchFileDescriptor(int fd, |
+ bool persistent, |
+ Mode mode, |
+ FileDescriptorWatcher *controller, |
+ Watcher *delegate); |
+ |
+ private: |
+ base::MessagePumpIOSForIO* pump_io() { |
+ return static_cast<base::MessagePumpIOSForIO*>(pump_.get()); |
+ } |
+ |
#elif defined(OS_POSIX) |
// Please see MessagePumpLibevent for definition. |
bool WatchFileDescriptor(int fd, |