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

Unified Diff: ui/aura/x11_atom_cache.cc

Issue 10829341: Desktop aura: Use the X11 clipboard (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix MessageLoop ordering in tests. Created 8 years, 3 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/aura/x11_atom_cache.h ('k') | ui/base/clipboard/clipboard.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/x11_atom_cache.cc
diff --git a/ui/aura/x11_atom_cache.cc b/ui/aura/x11_atom_cache.cc
deleted file mode 100644
index 9da1e529e5de5c932899456d4e04b3e57796489f..0000000000000000000000000000000000000000
--- a/ui/aura/x11_atom_cache.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/aura/x11_atom_cache.h"
-
-#include <X11/Xatom.h>
-
-#include "base/message_pump_aurax11.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace aura {
-
-X11AtomCache::X11AtomCache(Display* xdisplay, const char** to_cache)
- : xdisplay_(xdisplay) {
- int cache_count = 0;
- for (const char** i = to_cache; *i != NULL; i++)
- cache_count++;
-
- scoped_array< ::Atom> cached_atoms(new ::Atom[cache_count]);
-
- // Grab all the atoms we need now to minimize roundtrips to the X11 server.
- XInternAtoms(base::MessagePumpAuraX11::GetDefaultXDisplay(),
- const_cast<char**>(to_cache), cache_count, False,
- cached_atoms.get());
-
- for (int i = 0; i < cache_count; ++i)
- cached_atoms_.insert(std::make_pair(to_cache[i], cached_atoms[i]));
-}
-
-X11AtomCache::~X11AtomCache() {}
-
-::Atom X11AtomCache::GetAtom(const char* name) const {
- std::map<std::string, ::Atom>::const_iterator it = cached_atoms_.find(name);
- CHECK(it != cached_atoms_.end());
- return it->second;
-}
-
-} // namespace aura
« no previous file with comments | « ui/aura/x11_atom_cache.h ('k') | ui/base/clipboard/clipboard.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698