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

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

Issue 2924343002: Move ui::GetAtom to gfx::GetAtom (Closed)
Patch Set: fix CrOs build Created 3 years, 6 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
« no previous file with comments | « ui/gfx/icc_profile_x11.cc ('k') | ui/gfx/x/x11_atom_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 91e68786fb0136c4b112c87bc218b3d8b7134bf0..19bebbe0c5b96e827a67916f01318745c6ac26db 100644
--- a/ui/gfx/x/x11_atom_cache.h
+++ b/ui/gfx/x/x11_atom_cache.h
@@ -17,7 +17,10 @@ template <typename T>
struct DefaultSingletonTraits;
}
-namespace ui {
+namespace gfx {
+
+// Gets the X atom for default display corresponding to atom_name.
+GFX_EXPORT XAtom GetAtom(const char* atom_name);
// Pre-caches all Atoms on first use to minimize roundtrips to the X11
// server. By default, GetAtom() will CHECK() that atoms accessed through
@@ -27,15 +30,16 @@ class GFX_EXPORT X11AtomCache {
public:
static X11AtomCache* GetInstance();
- // Returns the pre-interned Atom without having to go to the x server.
- XAtom GetAtom(const char*) const;
-
private:
+ friend XAtom GetAtom(const char* atom_name);
friend struct base::DefaultSingletonTraits<X11AtomCache>;
X11AtomCache();
~X11AtomCache();
+ // Returns the pre-interned Atom without having to go to the x server.
+ XAtom GetAtom(const char*) const;
+
XDisplay* xdisplay_;
mutable std::map<std::string, XAtom> cached_atoms_;
@@ -43,6 +47,6 @@ class GFX_EXPORT X11AtomCache {
DISALLOW_COPY_AND_ASSIGN(X11AtomCache);
};
-} // namespace ui
+} // namespace gfx
#endif // UI_GFX_X_X11_ATOM_CACHE_H_
« no previous file with comments | « ui/gfx/icc_profile_x11.cc ('k') | ui/gfx/x/x11_atom_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698