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 SERVICES_UI_WS_IDS_H_ |
6 #define COMPONENTS_MUS_WS_IDS_H_ | 6 #define SERVICES_UI_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/containers/hash_tables.h" |
13 #include "base/hash.h" | 13 #include "base/hash.h" |
14 #include "components/mus/common/types.h" | 14 #include "services/ui/common/types.h" |
15 #include "components/mus/common/util.h" | 15 #include "services/ui/common/util.h" |
16 | 16 |
17 namespace mus { | 17 namespace mus { |
18 namespace ws { | 18 namespace ws { |
19 | 19 |
20 // A client id used to indicate no client. That is, no WindowTree ever gets this | 20 // A client id used to indicate no client. That is, no WindowTree ever gets this |
21 // id. | 21 // id. |
22 const ClientSpecificId kInvalidClientId = 0; | 22 const ClientSpecificId kInvalidClientId = 0; |
23 | 23 |
24 // Every window has a unique id associated with it (WindowId). The id is a | 24 // Every window has a unique id associated with it (WindowId). The id is a |
25 // combination of the id assigned to the client (the high order bits) and | 25 // combination of the id assigned to the client (the high order bits) and |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 template <> | 104 template <> |
105 struct hash<mus::ws::WindowId> { | 105 struct hash<mus::ws::WindowId> { |
106 size_t operator()(const mus::ws::WindowId& id) const { | 106 size_t operator()(const mus::ws::WindowId& id) const { |
107 return hash<mus::Id>()(WindowIdToTransportId(id)); | 107 return hash<mus::Id>()(WindowIdToTransportId(id)); |
108 } | 108 } |
109 }; | 109 }; |
110 | 110 |
111 } // namespace BASE_HASH_NAMESPACE | 111 } // namespace BASE_HASH_NAMESPACE |
112 | 112 |
113 #endif // COMPONENTS_MUS_WS_IDS_H_ | 113 #endif // SERVICES_UI_WS_IDS_H_ |
OLD | NEW |