Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1470)

Unified Diff: ui/gfx/x/x11_atom_cache.h

Issue 268673017: Fix X11TopmostWindowFinder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/gfx/x/x11_atom_cache.h
diff --git a/ui/gfx/x/x11_atom_cache.h b/ui/gfx/x/x11_atom_cache.h
index fefa64205d06e404b75675cabe32b3f603f4e4bb..6a29df720c6fec9bd54f90b5c8d5e3daec287d30 100644
--- a/ui/gfx/x/x11_atom_cache.h
+++ b/ui/gfx/x/x11_atom_cache.h
@@ -5,16 +5,14 @@
#ifndef UI_GFX_X_X11_ATOM_CACHE_H_
#define UI_GFX_X_X11_ATOM_CACHE_H_
-#include "base/basictypes.h"
-#include "ui/gfx/gfx_export.h"
-
#include <map>
#include <string>
-#include <X11/Xlib.h>
+#include "base/basictypes.h"
+#include "ui/gfx/gfx_export.h"
-// Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class.
-#undef RootWindow
+typedef unsigned long Atom;
+typedef struct _XDisplay XDisplay;
namespace ui {
@@ -25,22 +23,22 @@ namespace ui {
class GFX_EXPORT X11AtomCache {
public:
// Preinterns the NULL terminated list of string |to_cache_ on |xdisplay|.
- X11AtomCache(Display* xdisplay, const char** to_cache);
+ X11AtomCache(XDisplay* xdisplay, const char** to_cache);
~X11AtomCache();
// Returns the pre-interned Atom without having to go to the x server.
- ::Atom GetAtom(const char*) const;
+ Atom GetAtom(const char*) const;
// When an Atom isn't in the list of items we've cached, we should look it
// up, cache it locally, and then return the result.
void allow_uncached_atoms() { uncached_atoms_allowed_ = true; }
private:
- Display* xdisplay_;
+ XDisplay* xdisplay_;
bool uncached_atoms_allowed_;
- mutable std::map<std::string, ::Atom> cached_atoms_;
+ mutable std::map<std::string, Atom> cached_atoms_;
DISALLOW_COPY_AND_ASSIGN(X11AtomCache);
};

Powered by Google App Engine
This is Rietveld 408576698