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

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

Issue 250633003: Adds more to viewmanager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: override Created 6 years, 8 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/public/interfaces/view_manager/view_manager.mojom ('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 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
« no previous file with comments | « mojo/services/public/interfaces/view_manager/view_manager.mojom ('k') | mojo/services/view_manager/node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698