Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Unified Diff: base/message_loop.cc

Issue 7276045: Give a CFRunLoop to the IO message loop type on Mac OS X. Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/message_loop.h ('k') | base/message_pump_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.cc
===================================================================
--- base/message_loop.cc (revision 90809)
+++ base/message_loop.cc (working copy)
@@ -22,13 +22,11 @@
#if defined(OS_MACOSX)
#include "base/message_pump_mac.h"
#endif
-#if defined(OS_POSIX)
-#include "base/message_pump_libevent.h"
-#endif
#if defined(OS_POSIX) && !defined(OS_MACOSX)
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
+#include "base/message_pump_libevent.h"
#if defined(TOUCH_UI)
#include "base/message_pump_x.h"
#else
@@ -176,7 +174,7 @@
#define MESSAGE_PUMP_IO new base::MessagePumpForIO()
#elif defined(OS_MACOSX)
#define MESSAGE_PUMP_UI base::MessagePumpMac::Create()
-#define MESSAGE_PUMP_IO new base::MessagePumpLibevent()
+#define MESSAGE_PUMP_IO base::MessagePumpMac::Create()
Mark Mentovai 2011/06/29 01:21:21 As I mentioned last week, I don’t really want to m
#elif defined(TOUCH_UI)
#define MESSAGE_PUMP_UI new base::MessagePumpX()
#define MESSAGE_PUMP_IO new base::MessagePumpLibevent()
@@ -856,6 +854,21 @@
return pump_io()->WaitForIOCompletion(timeout, filter);
}
+#elif defined(OS_MACOSX)
+
+bool MessageLoopForIO::WatchFileDescriptor(int fd,
+ bool persistent,
+ Mode mode,
+ FileDescriptorWatcher *controller,
+ Watcher *delegate) {
+ return pump_mac()->WatchFileDescriptor(
+ fd,
+ persistent,
+ static_cast<base::MessagePumpCFRunLoopBase::Mode>(mode),
+ controller,
+ delegate);
+}
+
#elif defined(OS_POSIX) && !defined(OS_NACL)
bool MessageLoopForIO::WatchFileDescriptor(int fd,
« no previous file with comments | « base/message_loop.h ('k') | base/message_pump_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698