Index: mojo/services/view_manager/ids.h |
diff --git a/mojo/services/view_manager/ids.h b/mojo/services/view_manager/ids.h |
index 257402bb91bdc2cf45fd6ae9f684629e4faf2e87..d42e18fa1adb59fb177a17b9d918acb58598777a 100644 |
--- a/mojo/services/view_manager/ids.h |
+++ b/mojo/services/view_manager/ids.h |
@@ -23,6 +23,10 @@ struct MOJO_VIEW_MANAGER_EXPORT NodeId { |
other.node_id == node_id; |
} |
+ bool operator!=(const NodeId& other) const { |
+ return !(*this == other); |
+ } |
+ |
uint16_t connection_id; |
uint16_t node_id; |
}; |
@@ -39,6 +43,10 @@ struct MOJO_VIEW_MANAGER_EXPORT ViewId { |
other.view_id == view_id; |
} |
+ bool operator!=(const ViewId& other) const { |
+ return !(*this == other); |
+ } |
+ |
uint16_t connection_id; |
uint16_t view_id; |
}; |
@@ -64,6 +72,10 @@ inline ViewId ViewIdFromTransportId(uint32_t id) { |
return ViewId(FirstIdFromTransportId(id), SecondIdFromTransportId(id)); |
} |
+inline uint32_t ViewIdToTransportId(const ViewId& id) { |
+ return (id.connection_id << 16) | id.view_id; |
+} |
+ |
} // namespace view_manager |
} // namespace services |
} // namespace mojo |