Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef __PLATFORM_WINDOW_MANAGER_ATOM_CACHE_H__ | 5 #ifndef WINDOW_MANAGER_ATOM_CACHE_H_ |
| 6 #define __PLATFORM_WINDOW_MANAGER_ATOM_CACHE_H__ | 6 #define WINDOW_MANAGER_ATOM_CACHE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 extern "C" { | 11 extern "C" { |
| 12 #include <X11/Xlib.h> | 12 #include <X11/Xlib.h> |
| 13 } | 13 } |
| 14 | 14 |
| 15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
| 16 | 16 |
| 17 namespace chromeos { | 17 namespace window_manager { |
| 18 | 18 |
| 19 class XConnection; // from x_connection.h | 19 class XConnection; // from x_connection.h |
| 20 | 20 |
| 21 typedef ::Atom XAtom; | 21 typedef ::Atom XAtom; |
| 22 | 22 |
| 23 // Atom names with "_" prefixes (if any) stripped. | 23 // Atom names with "_" prefixes (if any) stripped. |
| 24 // | 24 // |
| 25 // When adding a new value, also insert a mapping to its actual name in | 25 // When adding a new value, also insert a mapping to its actual name in |
| 26 // kAtomInfos in atom_cache.cc. | 26 // kAtomInfos in atom_cache.cc. |
| 27 enum Atom { | 27 enum Atom { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 // Maps from our Atom enum to the X server's atom IDs and from the | 86 // Maps from our Atom enum to the X server's atom IDs and from the |
| 87 // server's IDs to atoms' string names. These maps aren't necessarily in | 87 // server's IDs to atoms' string names. These maps aren't necessarily in |
| 88 // sync; 'atom_to_xatom_' is constant after the constructor finishes but | 88 // sync; 'atom_to_xatom_' is constant after the constructor finishes but |
| 89 // GetName() caches additional string mappings in 'xatom_to_string_'. | 89 // GetName() caches additional string mappings in 'xatom_to_string_'. |
| 90 std::map<Atom, XAtom> atom_to_xatom_; | 90 std::map<Atom, XAtom> atom_to_xatom_; |
| 91 std::map<XAtom, std::string> xatom_to_string_; | 91 std::map<XAtom, std::string> xatom_to_string_; |
| 92 | 92 |
| 93 DISALLOW_COPY_AND_ASSIGN(AtomCache); | 93 DISALLOW_COPY_AND_ASSIGN(AtomCache); |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 } // namespace chromeos | 96 } // namespace window_manager |
| 97 | 97 |
| 98 #endif | 98 #endif |
|
sky
2009/12/21 15:44:29
Style guide says this should be:
#endif // WINDO
| |
| OLD | NEW |