Index: ui/base/x/selection_requestor.h |
diff --git a/ui/base/x/selection_requestor.h b/ui/base/x/selection_requestor.h |
index e092850532a546f655838e561defb430302af5e3..990dab22b22bf7f5c55a67142ddab43e9e608956 100644 |
--- a/ui/base/x/selection_requestor.h |
+++ b/ui/base/x/selection_requestor.h |
@@ -15,9 +15,11 @@ |
#include "base/basictypes.h" |
#include "base/callback.h" |
+#include "base/event_types.h" |
#include "base/memory/ref_counted_memory.h" |
#include "ui/base/ui_base_export.h" |
#include "ui/gfx/x/x11_atom_cache.h" |
+#include "ui/gfx/x/x11_types.h" |
namespace ui { |
class PlatformEventDispatcher; |
@@ -32,9 +34,9 @@ class SelectionData; |
// implement per-component fast-paths. |
class UI_BASE_EXPORT SelectionRequestor { |
public: |
- SelectionRequestor(Display* xdisplay, |
- ::Window xwindow, |
- ::Atom selection_name, |
+ SelectionRequestor(XDisplay* xdisplay, |
+ XID xwindow, |
+ XAtom selection_name, |
PlatformEventDispatcher* dispatcher); |
~SelectionRequestor(); |
@@ -43,34 +45,34 @@ class UI_BASE_EXPORT SelectionRequestor { |
// back. The result is stored in |out_data|. |
// |out_data_items| is the length of |out_data| in |out_type| items. |
bool PerformBlockingConvertSelection( |
- ::Atom target, |
+ XAtom target, |
scoped_refptr<base::RefCountedMemory>* out_data, |
size_t* out_data_items, |
- ::Atom* out_type); |
+ XAtom* out_type); |
// Requests |target| from the selection that we handle, passing |parameter| |
// as a parameter to XConvertSelection(). |
void PerformBlockingConvertSelectionWithParameter( |
- ::Atom target, |
- const std::vector< ::Atom>& parameter); |
+ XAtom target, |
+ const std::vector<XAtom>& parameter); |
// Returns the first of |types| offered by the current selection holder, or |
// returns NULL if none of those types are available. |
- SelectionData RequestAndWaitForTypes(const std::vector< ::Atom>& types); |
+ SelectionData RequestAndWaitForTypes(const std::vector<XAtom>& types); |
// It is our owner's responsibility to plumb X11 SelectionNotify events on |
// |xwindow_| to us. |
- void OnSelectionNotify(const XSelectionEvent& event); |
+ void OnSelectionNotify(const XEvent& event); |
private: |
// A request that has been issued and we are waiting for a response to. |
struct PendingRequest { |
- explicit PendingRequest(Atom target); |
+ explicit PendingRequest(XAtom target); |
~PendingRequest(); |
// Data to the current XConvertSelection request. Used for error detection; |
// we verify it on the return message. |
- ::Atom target; |
+ XAtom target; |
// Called to terminate the nested message loop. |
base::Closure quit_closure; |
@@ -79,7 +81,7 @@ class UI_BASE_EXPORT SelectionRequestor { |
// success. If None, our request failed somehow. If equal to the property |
// atom that we sent in the XConvertSelection call, we can read that |
// property on |x_window_| for the requested data. |
- ::Atom returned_property; |
+ XAtom returned_property; |
// Set to true when return_property is populated. |
bool returned; |
@@ -90,11 +92,11 @@ class UI_BASE_EXPORT SelectionRequestor { |
void BlockTillSelectionNotifyForRequest(PendingRequest* request); |
// Our X11 state. |
- Display* x_display_; |
- ::Window x_window_; |
+ XDisplay* x_display_; |
+ XID x_window_; |
// The X11 selection that this instance communicates on. |
- ::Atom selection_name_; |
+ XAtom selection_name_; |
// Dispatcher which handles SelectionNotify and SelectionRequest for |
// |selection_name_|. PerformBlockingConvertSelection() calls the |