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

Unified Diff: mojo/edk/system/message_in_transit.h

Issue 1488853002: Add multiplexing of message pipes in the new EDK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tsepez review comments Created 5 years 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/edk/system/dispatcher.h ('k') | mojo/edk/system/message_in_transit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_in_transit.h
diff --git a/mojo/edk/system/message_in_transit.h b/mojo/edk/system/message_in_transit.h
index 78dc40a2d28b07d7068620275295a2c677fade29..bebaaf758481b9e93e06372efd76007278cc26c7 100644
--- a/mojo/edk/system/message_in_transit.h
+++ b/mojo/edk/system/message_in_transit.h
@@ -103,6 +103,7 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit {
return static_cast<const char*>(buffer_) + sizeof(Header);
}
Type type() const { return header()->type; }
+ uint64_t route_id() const { return header()->route_id; }
private:
const Header* header() const { return static_cast<const Header*>(buffer_); }
@@ -171,6 +172,9 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit {
Type type() const { return header()->type; }
+ void set_route_id(uint64_t route_id) { header()->route_id = route_id; }
+ uint64_t route_id() const { return header()->route_id; }
+
// Gets the dispatchers attached to this message; this may return null if
// there are none. Note that the caller may mutate the set of dispatchers
// (e.g., take ownership of all the dispatchers, leaving the vector empty).
@@ -200,9 +204,10 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit {
// |SerializeAndCloseDispatchers()| has not been called.
uint32_t total_size;
Type type; // 2 bytes.
- Type unusedforalignment; // 2 bytes.
+ uint16_t unusedforalignment; // 2 bytes.
uint32_t num_bytes;
uint32_t unused;
+ uint64_t route_id;
};
const Header* header() const {
« no previous file with comments | « mojo/edk/system/dispatcher.h ('k') | mojo/edk/system/message_in_transit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698