Index: base/message_loop.cc |
diff --git a/base/message_loop.cc b/base/message_loop.cc |
index f4279935227e760f0061025a092ca477ba19b249..542802672927403a6d57f35ed65f11bc5d10d502 100644 |
--- a/base/message_loop.cc |
+++ b/base/message_loop.cc |
@@ -27,7 +27,7 @@ |
#if defined(OS_MACOSX) |
#include "base/message_pump_mac.h" |
#endif |
-#if defined(OS_POSIX) |
+#if defined(OS_POSIX) && !defined(OS_IOS) |
#include "base/message_pump_libevent.h" |
#endif |
#if defined(OS_ANDROID) |
@@ -157,6 +157,9 @@ MessageLoop::MessageLoop(Type type) |
#if defined(OS_WIN) |
#define MESSAGE_PUMP_UI new base::MessagePumpForUI() |
#define MESSAGE_PUMP_IO new base::MessagePumpForIO() |
+#elif defined(OS_IOS) |
+#define MESSAGE_PUMP_UI base::MessagePumpMac::Create() |
+#define MESSAGE_PUMP_IO new base::MessagePumpIOSForIO() |
#elif defined(OS_MACOSX) |
#define MESSAGE_PUMP_UI base::MessagePumpMac::Create() |
#define MESSAGE_PUMP_IO new base::MessagePumpLibevent() |
@@ -776,6 +779,21 @@ bool MessageLoopForIO::WaitForIOCompletion(DWORD timeout, IOHandler* filter) { |
return pump_io()->WaitForIOCompletion(timeout, filter); |
} |
+#elif defined(OS_IOS) |
+ |
+bool MessageLoopForIO::WatchFileDescriptor(int fd, |
+ bool persistent, |
+ Mode mode, |
+ FileDescriptorWatcher *controller, |
+ Watcher *delegate) { |
+ return pump_io()->WatchFileDescriptor( |
+ fd, |
+ persistent, |
+ mode, |
+ controller, |
+ delegate); |
+} |
+ |
#elif defined(OS_POSIX) && !defined(OS_NACL) |
bool MessageLoopForIO::WatchFileDescriptor(int fd, |
@@ -786,7 +804,7 @@ bool MessageLoopForIO::WatchFileDescriptor(int fd, |
return pump_libevent()->WatchFileDescriptor( |
fd, |
persistent, |
- static_cast<base::MessagePumpLibevent::Mode>(mode), |
+ mode, |
controller, |
delegate); |
} |