OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium 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 COMPONENTS_MUS_WS_IDS_H_ | 5 #ifndef COMPONENTS_MUS_WS_IDS_H_ |
6 #define COMPONENTS_MUS_WS_IDS_H_ | 6 #define COMPONENTS_MUS_WS_IDS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <tuple> | 10 #include <tuple> |
11 | 11 |
| 12 #include "base/containers/hash_tables.h" |
12 #include "base/hash.h" | 13 #include "base/hash.h" |
13 #include "components/mus/common/types.h" | 14 #include "components/mus/common/types.h" |
14 #include "components/mus/common/util.h" | 15 #include "components/mus/common/util.h" |
15 | 16 |
16 namespace mus { | 17 namespace mus { |
17 namespace ws { | 18 namespace ws { |
18 | 19 |
19 // Connection id is used to indicate no connection. That is, no WindowTreeImpl | 20 // Connection id is used to indicate no connection. That is, no WindowTreeImpl |
20 // ever gets this id. | 21 // ever gets this id. |
21 const ConnectionSpecificId kInvalidConnectionId = 0; | 22 const ConnectionSpecificId kInvalidConnectionId = 0; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 template <> | 104 template <> |
104 struct hash<mus::ws::WindowId> { | 105 struct hash<mus::ws::WindowId> { |
105 size_t operator()(const mus::ws::WindowId& id) const { | 106 size_t operator()(const mus::ws::WindowId& id) const { |
106 return hash<mus::Id>()(WindowIdToTransportId(id)); | 107 return hash<mus::Id>()(WindowIdToTransportId(id)); |
107 } | 108 } |
108 }; | 109 }; |
109 | 110 |
110 } // namespace BASE_HASH_NAMESPACE | 111 } // namespace BASE_HASH_NAMESPACE |
111 | 112 |
112 #endif // COMPONENTS_MUS_WS_IDS_H_ | 113 #endif // COMPONENTS_MUS_WS_IDS_H_ |
OLD | NEW |