summaryrefslogtreecommitdiffstats
path: root/base/message_pump_gtk.h
diff options
context:
space:
mode:
authoroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-22 19:49:23 +0000
committeroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-22 19:49:23 +0000
commit2656a354677e57bd271160c0edcbeb2cad541f51 (patch)
treedde422a236acb69418d0ada4819228d510d2fd4a /base/message_pump_gtk.h
parent74b9241c1734b73b48aff28710509ba810b65032 (diff)
downloadchromium_src-2656a354677e57bd271160c0edcbeb2cad541f51.zip
chromium_src-2656a354677e57bd271160c0edcbeb2cad541f51.tar.gz
chromium_src-2656a354677e57bd271160c0edcbeb2cad541f51.tar.bz2
re-landing r93629
Consolidate access to X Display Change ui::GetXDisplay to use the MessagePumpForUI class to get Display. This allows us to have two different implementation for x and gtk. Remove MessageLoop::GetDisplay from message loop API. Client should use ui::GetXDisplay instead. This will also be removed in near future, and client should get display from window it is dealing with. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=93629 Review URL: http://codereview.chromium.org/7484006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93686 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_pump_gtk.h')
-rw-r--r--base/message_pump_gtk.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/base/message_pump_gtk.h b/base/message_pump_gtk.h
index 72eaafa..5fa21f7 100644
--- a/base/message_pump_gtk.h
+++ b/base/message_pump_gtk.h
@@ -9,6 +9,7 @@
#include "base/message_pump_glib.h"
typedef union _GdkEvent GdkEvent;
+typedef struct _XDisplay Display;
namespace base {
@@ -40,7 +41,7 @@ class MessagePumpDispatcher {
};
// This class implements a message-pump for dispatching GTK events.
-class MessagePumpGtk : public MessagePumpGlib {
+class BASE_API MessagePumpGtk : public MessagePumpGlib {
public:
MessagePumpGtk();
virtual ~MessagePumpGtk();
@@ -49,6 +50,9 @@ class MessagePumpGtk : public MessagePumpGlib {
// some task before/after calling the default handler (EventDispatcher).
void DispatchEvents(GdkEvent* event);
+ // Returns default X Display.
+ static Display* GetDefaultXDisplay();
+
private:
// Overridden from MessagePumpGlib
virtual bool RunOnce(GMainContext* context, bool block) OVERRIDE;