summaryrefslogtreecommitdiffstats
path: root/base/message_pump_glib.h
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 20:45:54 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 20:45:54 +0000
commit831a32d135fdeeea1f906742074f3b72312e9669 (patch)
treec692080f8a9a25101e9adca2c8c3797233bf1eb6 /base/message_pump_glib.h
parentf16785b4bbd3449580e7998d83a80b0b2fb6dcd1 (diff)
downloadchromium_src-831a32d135fdeeea1f906742074f3b72312e9669.zip
chromium_src-831a32d135fdeeea1f906742074f3b72312e9669.tar.gz
chromium_src-831a32d135fdeeea1f906742074f3b72312e9669.tar.bz2
Avoid including gtk & glib headers in message_pump_glib.h, saves 1 sec on do-nothing make.
TEST=manual browser test, trybots BUG=none Review URL: http://codereview.chromium.org/464031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33851 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_pump_glib.h')
-rw-r--r--base/message_pump_glib.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/base/message_pump_glib.h b/base/message_pump_glib.h
index 08e1964..d140dbf 100644
--- a/base/message_pump_glib.h
+++ b/base/message_pump_glib.h
@@ -5,13 +5,16 @@
#ifndef BASE_MESSAGE_PUMP_GLIB_H_
#define BASE_MESSAGE_PUMP_GLIB_H_
-#include <gtk/gtk.h>
-#include <glib.h>
-
#include "base/message_pump.h"
#include "base/observer_list.h"
+#include "base/scoped_ptr.h"
#include "base/time.h"
+typedef union _GdkEvent GdkEvent;
+typedef struct _GMainContext GMainContext;
+typedef struct _GPollFD GPollFD;
+typedef struct _GSource GSource;
+
namespace base {
// This class implements a MessagePump needed for TYPE_UI MessageLoops on
@@ -103,7 +106,7 @@ class MessagePumpForUI : public MessagePump {
void DidProcessEvent(GdkEvent* event);
// Callback prior to gdk dispatching an event.
- static void EventDispatcher(GdkEvent* event, gpointer data);
+ static void EventDispatcher(GdkEvent* event, void* data);
RunState* state_;
@@ -125,7 +128,8 @@ class MessagePumpForUI : public MessagePump {
// Dispatch() will be called.
int wakeup_pipe_read_;
int wakeup_pipe_write_;
- GPollFD wakeup_gpollfd_;
+ // Use a scoped_ptr to avoid needing the definition of GPollFD in the header.
+ scoped_ptr<GPollFD> wakeup_gpollfd_;
// List of observers.
ObserverList<Observer> observers_;