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 MOJO_SERVICES_VIEW_MANAGER_IDS_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_IDS_H_ |
6 #define MOJO_SERVICES_VIEW_MANAGER_IDS_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_IDS_H_ |
7 | 7 |
8 #include "mojo/services/public/cpp/view_manager/types.h" | 8 #include "mojo/services/public/cpp/view_manager/types.h" |
9 #include "mojo/services/public/cpp/view_manager/util.h" | 9 #include "mojo/services/public/cpp/view_manager/util.h" |
10 #include "mojo/services/view_manager/view_manager_export.h" | 10 #include "mojo/services/view_manager/view_manager_export.h" |
11 | 11 |
12 namespace mojo { | 12 namespace mojo { |
13 namespace view_manager { | |
14 namespace service { | 13 namespace service { |
15 | 14 |
16 // Connection id reserved for the root. | 15 // Connection id reserved for the root. |
17 const ConnectionSpecificId kRootConnection = 0; | 16 const ConnectionSpecificId kRootConnection = 0; |
18 | 17 |
19 // TODO(sky): remove this, temporary while window manager API is in existing | 18 // TODO(sky): remove this, temporary while window manager API is in existing |
20 // api. | 19 // api. |
21 const ConnectionSpecificId kWindowManagerConnection = 1; | 20 const ConnectionSpecificId kWindowManagerConnection = 1; |
22 | 21 |
23 // Adds a bit of type safety to node ids. | 22 // Adds a bit of type safety to node ids. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 return NodeId(kRootConnection, 1); | 80 return NodeId(kRootConnection, 1); |
82 } | 81 } |
83 | 82 |
84 // Returns a NodeId that is reserved to indicate no node. That is, no node will | 83 // Returns a NodeId that is reserved to indicate no node. That is, no node will |
85 // ever be created with this id. | 84 // ever be created with this id. |
86 inline NodeId InvalidNodeId() { | 85 inline NodeId InvalidNodeId() { |
87 return NodeId(kRootConnection, 0); | 86 return NodeId(kRootConnection, 0); |
88 } | 87 } |
89 | 88 |
90 } // namespace service | 89 } // namespace service |
91 } // namespace view_manager | |
92 } // namespace mojo | 90 } // namespace mojo |
93 | 91 |
94 #endif // MOJO_SERVICES_VIEW_MANAGER_IDS_H_ | 92 #endif // MOJO_SERVICES_VIEW_MANAGER_IDS_H_ |
OLD | NEW |