Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: components/view_manager/ids.h

Issue 1314953002: Rename ViewManagerService,ViewManagerClient -> ViewTree,ViewTreeClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_VIEW_MANAGER_IDS_H_ 5 #ifndef COMPONENTS_VIEW_MANAGER_IDS_H_
6 #define COMPONENTS_VIEW_MANAGER_IDS_H_ 6 #define COMPONENTS_VIEW_MANAGER_IDS_H_
7 7
8 #include "components/view_manager/public/cpp/types.h" 8 #include "components/view_manager/public/cpp/types.h"
9 #include "components/view_manager/public/cpp/util.h" 9 #include "components/view_manager/public/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 ViewTreeImpl
14 // ViewManagerServiceImpl ever gets this id. 14 // 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,
20 mojo::ConnectionSpecificId view_id) 20 mojo::ConnectionSpecificId view_id)
21 : connection_id(connection_id), view_id(view_id) {} 21 : connection_id(connection_id), view_id(view_id) {}
22 ViewId() : connection_id(0), view_id(0) {} 22 ViewId() : connection_id(0), view_id(0) {}
23 23
24 bool operator==(const ViewId& other) const { 24 bool operator==(const ViewId& other) const {
(...skipping 29 matching lines...) Expand all
54 } 54 }
55 55
56 // Returns a root view id with a given index offset. 56 // Returns a root view id with a given index offset.
57 inline ViewId RootViewId(uint16_t index) { 57 inline ViewId RootViewId(uint16_t index) {
58 return ViewId(kInvalidConnectionId, 2 + index); 58 return ViewId(kInvalidConnectionId, 2 + index);
59 } 59 }
60 60
61 } // namespace view_manager 61 } // namespace view_manager
62 62
63 #endif // COMPONENTS_VIEW_MANAGER_IDS_H_ 63 #endif // COMPONENTS_VIEW_MANAGER_IDS_H_
OLDNEW
« no previous file with comments | « components/view_manager/display_manager_delegate.h ('k') | components/view_manager/public/cpp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698