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

Unified Diff: mojo/system/message_in_transit.h

Issue 227383006: Mojo: Allow dispatchers to attach PlatformHandles to the MessageInTransit on serialization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/system/dispatcher.cc ('k') | mojo/system/message_in_transit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_in_transit.h
diff --git a/mojo/system/message_in_transit.h b/mojo/system/message_in_transit.h
index 4e91c2ab3e74266dc84acbd0d7a41c0fc8acb5de..bf8d5cf186d0caddb7ebfcb8020887b0e80e1e1a 100644
--- a/mojo/system/message_in_transit.h
+++ b/mojo/system/message_in_transit.h
@@ -70,6 +70,10 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit {
// of |kMessageAlignment|.
static const size_t kMaxSerializedDispatcherSize = 10000;
+ // The maximum number of platform handles to attach for a single serialized
+ // dispatcher.
+ static const size_t kMaxSerializedDispatcherPlatformHandles = 2;
+
// Forward-declare |Header| so that |View| can use it:
private:
struct Header;
@@ -265,6 +269,9 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit {
// The maximum possible size of a valid secondary buffer.
static const size_t kMaxSecondaryBufferSize;
+ // The maximum total number of platform handles that may be attached.
+ static const size_t kMaxPlatformHandles;
+
// Validates the secondary buffer. Returns null on success, or a
// human-readable error message (meant for logging/debugging) on error.
static const char* ValidateSecondaryBuffer(size_t num_handles,
« no previous file with comments | « mojo/system/dispatcher.cc ('k') | mojo/system/message_in_transit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698