summaryrefslogtreecommitdiffstats
path: root/base/message_loop.h
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-24 20:10:25 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-24 20:10:25 +0000
commit2047ef4d68229d47cba8bf7f2e0465ab31f8b3ce (patch)
tree86af296c2de9e5ac31c9ed79e21d9d0e4ccda8c4 /base/message_loop.h
parent86e1db9d9de1ce72ba045bd3755e7a077a1f7fd8 (diff)
downloadchromium_src-2047ef4d68229d47cba8bf7f2e0465ab31f8b3ce.zip
chromium_src-2047ef4d68229d47cba8bf7f2e0465ab31f8b3ce.tar.gz
chromium_src-2047ef4d68229d47cba8bf7f2e0465ab31f8b3ce.tar.bz2
Refactor the glib message-pump, and use it as the base for a gtk message pump and an X message pump.
The changes: * Rename MessagePumpGlibX to MessagePumpX. * Rename MessagePumpForUI to MessagePumpGlib. * Move some stuff out of MessagePumpGlib, and into MessagePumpGtk and MessagePumpX. * Rename MessagePumpForUI::Observer to MessageObserver, moved the platform-specific implementations into MessagePumpGtk and MessagePumpX. Ditto for MessagePumpForUI::Dispatcher. MessagePumpX is independent of MessagePumpGtk. At the moment, MessagePumpX does process some GDK event, but once we have a complete native_widget_x, we can take out the GDK processing and things should continue to work. BUG=none TEST=existing message-pump tests. Review URL: http://codereview.chromium.org/7250001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.h')
-rw-r--r--base/message_loop.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/base/message_loop.h b/base/message_loop.h
index 9a03d6b..8fd9cbc 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -27,12 +27,13 @@
#elif defined(OS_POSIX)
#include "base/message_pump_libevent.h"
#if !defined(OS_MACOSX)
-#include "base/message_pump_glib.h"
-typedef struct _XDisplay Display;
+#if defined(TOUCH_UI)
+#include "base/message_pump_x.h"
+#else
+#include "base/message_pump_gtk.h"
#endif
+typedef struct _XDisplay Display;
#endif
-#if defined(TOUCH_UI)
-#include "base/message_pump_glib_x_dispatch.h"
#endif
namespace base {
@@ -80,12 +81,9 @@ class BASE_API MessageLoop : public base::MessagePump::Delegate {
#if defined(OS_WIN)
typedef base::MessagePumpWin::Dispatcher Dispatcher;
typedef base::MessagePumpForUI::Observer Observer;
-#elif defined(TOUCH_UI)
- typedef base::MessagePumpGlibXDispatcher Dispatcher;
- typedef base::MessagePumpXObserver Observer;
#elif !defined(OS_MACOSX)
- typedef base::MessagePumpForUI::Dispatcher Dispatcher;
- typedef base::MessagePumpForUI::Observer Observer;
+ typedef base::MessagePumpDispatcher Dispatcher;
+ typedef base::MessagePumpObserver Observer;
#endif
// A MessageLoop has a particular type, which indicates the set of