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

Unified Diff: mojo/public/cpp/bindings/lib/message_internal.h

Issue 2660733002: Mojo C++ bindings: introduce an optional array to store transferred interface IDs in messages. (Closed)
Patch Set: . Created 3 years, 11 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
Index: mojo/public/cpp/bindings/lib/message_internal.h
diff --git a/mojo/public/cpp/bindings/lib/message_internal.h b/mojo/public/cpp/bindings/lib/message_internal.h
index ad3ef9913fa3cb89ec479e54a67d616ef19229ce..6693198f8111a408e6e40511e32001439c46d89c 100644
--- a/mojo/public/cpp/bindings/lib/message_internal.h
+++ b/mojo/public/cpp/bindings/lib/message_internal.h
@@ -20,6 +20,9 @@ class Message;
namespace internal {
+template <typename T>
+class Array_Data;
+
#pragma pack(push, 1)
struct MessageHeader : internal::StructHeader {
@@ -35,13 +38,19 @@ struct MessageHeader : internal::StructHeader {
};
static_assert(sizeof(MessageHeader) == 24, "Bad sizeof(MessageHeader)");
-struct MessageHeaderWithRequestID : MessageHeader {
+struct MessageHeaderV1 : MessageHeader {
// Only used if either kFlagExpectsResponse or kFlagIsResponse is set in
// order to match responses with corresponding requests.
uint64_t request_id;
};
-static_assert(sizeof(MessageHeaderWithRequestID) == 32,
- "Bad sizeof(MessageHeaderWithRequestID)");
+static_assert(sizeof(MessageHeaderV1) == 32, "Bad sizeof(MessageHeaderV1)");
+
+struct MessageHeaderV2 : MessageHeaderV1 {
+ MessageHeaderV2();
+ GenericPointer payload;
+ Pointer<Array_Data<uint32_t>> payload_interface_ids;
+};
+static_assert(sizeof(MessageHeaderV2) == 48, "Bad sizeof(MessageHeaderV2)");
#pragma pack(pop)
« no previous file with comments | « mojo/public/cpp/bindings/lib/message_header_validator.cc ('k') | mojo/public/cpp/bindings/lib/multiplex_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698