diff options
author | dsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-03 16:52:59 +0000 |
---|---|---|
committer | dsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-03 16:52:59 +0000 |
commit | 8fc3a4815737707de36239119a3d3c648b826e2f (patch) | |
tree | 212caac6e386552d01794b68fbae74722cea456f /base/message_loop.cc | |
parent | 748f1130a5fc046b5042390dd08b27df4b64c0cc (diff) | |
download | chromium_src-8fc3a4815737707de36239119a3d3c648b826e2f.zip chromium_src-8fc3a4815737707de36239119a3d3c648b826e2f.tar.gz chromium_src-8fc3a4815737707de36239119a3d3c648b826e2f.tar.bz2 |
Implement MessageLoopForUI using GLib. This gets some exercise from
base_unittest.
BUG=1319
Review URL: http://codereview.chromium.org/4261
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2834 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.cc')
-rw-r--r-- | base/message_loop.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/base/message_loop.cc b/base/message_loop.cc index 60a8ce5..348648f 100644 --- a/base/message_loop.cc +++ b/base/message_loop.cc @@ -19,6 +19,9 @@ #if defined(OS_POSIX) #include "base/message_pump_libevent.h" #endif +#if defined(OS_LINUX) +#include "base/message_pump_glib.h" +#endif // A lazily created thread local storage for quick access to a thread's message // loop, if one exists. This should be safe and free of static constructors. @@ -89,18 +92,17 @@ MessageLoop::MessageLoop(Type type) pump_ = new base::MessagePumpForUI(); } #elif defined(OS_POSIX) -#if defined(OS_MACOSX) if (type_ == TYPE_UI) { +#if defined(OS_MACOSX) pump_ = base::MessagePumpMac::Create(); - } else -#endif // OS_MACOSX - if (type_ == TYPE_IO) { +#elif defined(OS_LINUX) + pump_ = new base::MessagePumpForUI(); +#endif // OS_LINUX + } else if (type_ == TYPE_IO) { pump_ = new base::MessagePumpLibevent(); } else { pump_ = new base::MessagePumpDefault(); } -#else // OS_POSIX - pump_ = new base::MessagePumpDefault(); #endif // OS_POSIX } |