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

Side by Side Diff: ui/base/x/x11_atom_cache.cc

Issue 10381063: Aura/ash split: Don't use X11 window borders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Part 2: Patch minimization and puts event processing in X11WindowEventFilter. Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/base/x/x11_atom_cache.h"
6
7 #include <X11/Xatom.h>
8
9 #include "base/message_pump_x.h"
10
11 namespace {
12
13 // A list of atoms that we'll intern on host creation to save roundtrips to the
14 // X11 server. Must be kept in sync with AtomCache::AtomName
Daniel Erat 2012/05/15 20:59:41 This makes me nervous (especially combined with no
Elliot Glaysher 2012/05/15 21:56:32 Done.
15 const char* kAtomList[] = {
16 "WM_DELETE_WINDOW",
17 "_NET_WM_MOVERESIZE",
18 "_NET_WM_PING",
19 "_NET_WM_PID",
20 "WM_S0",
21 "_MOTIF_WM_HINTS"
22 };
23
24 } // namespace
25
26 namespace ui {
27
28 X11AtomCache* X11AtomCache::GetInstance() {
29 return Singleton<X11AtomCache>::get();
30 }
31
32 ::Atom X11AtomCache::GetAtom(AtomName name) const {
33 return cached_atoms_[name];
34 }
35
36 X11AtomCache::X11AtomCache() {
37 // Grab all the atoms we need now to minimize roundtrips to the X11 server.
38 XInternAtoms(base::MessagePumpX::GetDefaultXDisplay(),
39 const_cast<char**>(kAtomList), ATOM_COUNT, False,
40 cached_atoms_);
41 }
42
43 X11AtomCache::~X11AtomCache() {}
44
45 } // namespace ui
46
47
OLDNEW
« no previous file with comments | « ui/base/x/x11_atom_cache.h ('k') | ui/ui.gyp » ('j') | ui/views/widget/x11_window_event_filter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698