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

Unified Diff: mojo/services/view_manager/ids.h

Issue 513923004: More viewmanager renaming: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sim30 Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/services/view_manager/display_manager.cc ('k') | mojo/services/view_manager/node.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/view_manager/ids.h
diff --git a/mojo/services/view_manager/ids.h b/mojo/services/view_manager/ids.h
index 71e38332a3482a6d3c1c041615dac16e73cdcfe8..4a27c627b4e63db1a975e33ec213dfd6459520d6 100644
--- a/mojo/services/view_manager/ids.h
+++ b/mojo/services/view_manager/ids.h
@@ -20,26 +20,6 @@ const ConnectionSpecificId kInvalidConnectionId = 0;
// api.
const ConnectionSpecificId kWindowManagerConnection = 1;
-// Adds a bit of type safety to node ids.
-struct MOJO_VIEW_MANAGER_EXPORT NodeId {
- NodeId(ConnectionSpecificId connection_id, ConnectionSpecificId node_id)
- : connection_id(connection_id),
- node_id(node_id) {}
- NodeId() : connection_id(0), node_id(0) {}
-
- bool operator==(const NodeId& other) const {
- return other.connection_id == connection_id &&
- other.node_id == node_id;
- }
-
- bool operator!=(const NodeId& other) const {
- return !(*this == other);
- }
-
- ConnectionSpecificId connection_id;
- ConnectionSpecificId node_id;
-};
-
// Adds a bit of type safety to view ids.
struct MOJO_VIEW_MANAGER_EXPORT ViewId {
ViewId(ConnectionSpecificId connection_id, ConnectionSpecificId view_id)
@@ -60,15 +40,6 @@ struct MOJO_VIEW_MANAGER_EXPORT ViewId {
ConnectionSpecificId view_id;
};
-// Functions for converting to/from structs and transport values.
-inline NodeId NodeIdFromTransportId(Id id) {
- return NodeId(HiWord(id), LoWord(id));
-}
-
-inline Id NodeIdToTransportId(const NodeId& id) {
- return (id.connection_id << 16) | id.node_id;
-}
-
inline ViewId ViewIdFromTransportId(Id id) {
return ViewId(HiWord(id), LoWord(id));
}
@@ -77,14 +48,14 @@ inline Id ViewIdToTransportId(const ViewId& id) {
return (id.connection_id << 16) | id.view_id;
}
-inline NodeId RootNodeId() {
- return NodeId(kInvalidConnectionId, 1);
+inline ViewId RootViewId() {
+ return ViewId(kInvalidConnectionId, 1);
}
-// Returns a NodeId that is reserved to indicate no node. That is, no node will
+// Returns a ViewId that is reserved to indicate no view. That is, no view will
// ever be created with this id.
-inline NodeId InvalidNodeId() {
- return NodeId(kInvalidConnectionId, 0);
+inline ViewId InvalidViewId() {
+ return ViewId(kInvalidConnectionId, 0);
}
} // namespace service
« no previous file with comments | « mojo/services/view_manager/display_manager.cc ('k') | mojo/services/view_manager/node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698