diff options
author | oshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-22 19:49:23 +0000 |
---|---|---|
committer | oshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-22 19:49:23 +0000 |
commit | 2656a354677e57bd271160c0edcbeb2cad541f51 (patch) | |
tree | dde422a236acb69418d0ada4819228d510d2fd4a /base/message_pump_x.h | |
parent | 74b9241c1734b73b48aff28710509ba810b65032 (diff) | |
download | chromium_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_x.h')
-rw-r--r-- | base/message_pump_x.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/base/message_pump_x.h b/base/message_pump_x.h index ecadc1f..fdd1de8 100644 --- a/base/message_pump_x.h +++ b/base/message_pump_x.h @@ -14,6 +14,7 @@ #include <gtk/gtk.h> typedef union _XEvent XEvent; +typedef struct _XDisplay Display; namespace base { @@ -58,7 +59,7 @@ class MessagePumpDispatcher { }; // This class implements a message-pump for dispatching X events. -class MessagePumpX : public MessagePumpGlib { +class BASE_API MessagePumpX : public MessagePumpGlib { public: MessagePumpX(); virtual ~MessagePumpX(); @@ -74,6 +75,9 @@ class MessagePumpX : public MessagePumpGlib { // NativeWidgetX is enabled. static void DisableGtkMessagePump(); + // Returns default X Display. + static Display* GetDefaultXDisplay(); + private: // Some XEvent's can't be directly read from X event queue and will go // through GDK's dispatching process and may get discarded. This function |