| 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 SERVICES_VIEW_MANAGER_IDS_H_ | 5 #ifndef SERVICES_VIEW_MANAGER_IDS_H_ |
| 6 #define SERVICES_VIEW_MANAGER_IDS_H_ | 6 #define SERVICES_VIEW_MANAGER_IDS_H_ |
| 7 | 7 |
| 8 #include "mojo/services/view_manager/public/cpp/types.h" | 8 #include "mojo/services/view_manager/cpp/types.h" |
| 9 #include "mojo/services/view_manager/public/cpp/util.h" | 9 #include "mojo/services/view_manager/cpp/util.h" |
| 10 | 10 |
| 11 namespace view_manager { | 11 namespace view_manager { |
| 12 | 12 |
| 13 // Connection id is used to indicate no connection. That is, no | 13 // Connection id is used to indicate no connection. That is, no |
| 14 // ViewManagerServiceImpl ever gets this id. | 14 // ViewManagerServiceImpl ever gets this id. |
| 15 const mojo::ConnectionSpecificId kInvalidConnectionId = 0; | 15 const mojo::ConnectionSpecificId kInvalidConnectionId = 0; |
| 16 | 16 |
| 17 // Adds a bit of type safety to view ids. | 17 // Adds a bit of type safety to view ids. |
| 18 struct ViewId { | 18 struct ViewId { |
| 19 ViewId(mojo::ConnectionSpecificId connection_id, | 19 ViewId(mojo::ConnectionSpecificId connection_id, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 } | 53 } |
| 54 | 54 |
| 55 // All cloned views use this id. | 55 // All cloned views use this id. |
| 56 inline ViewId ClonedViewId() { | 56 inline ViewId ClonedViewId() { |
| 57 return ViewId(kInvalidConnectionId, 2); | 57 return ViewId(kInvalidConnectionId, 2); |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace view_manager | 60 } // namespace view_manager |
| 61 | 61 |
| 62 #endif // SERVICES_VIEW_MANAGER_IDS_H_ | 62 #endif // SERVICES_VIEW_MANAGER_IDS_H_ |
| OLD | NEW |