Index: base/message_loop.cc |
diff --git a/base/message_loop.cc b/base/message_loop.cc |
index f4279935227e760f0061025a092ca477ba19b249..5548d759ee68c0d0ace0b63dbe2b8732ad80d909 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, |
+ static_cast<base::MessagePumpIOSForIO::Mode>(mode), |
Mark Mentovai
2012/11/20 22:29:27
No cast, the callee should be accepting int. See t
blundell
2012/11/21 16:56:52
Done.
|
+ controller, |
+ delegate); |
+} |
+ |
#elif defined(OS_POSIX) && !defined(OS_NACL) |
bool MessageLoopForIO::WatchFileDescriptor(int fd, |