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

Unified Diff: mojo/public/cpp/bindings/lib/serialization_context.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
« no previous file with comments | « mojo/public/cpp/bindings/lib/serialization.h ('k') | mojo/public/cpp/bindings/lib/serialization_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/serialization_context.h
diff --git a/mojo/public/cpp/bindings/lib/serialization_context.h b/mojo/public/cpp/bindings/lib/serialization_context.h
index 4bded307ee8ccdc92064486986a694d634b14e45..a34fe3d4eda9f87a006e3b19a4735bd14b2c3a84 100644
--- a/mojo/public/cpp/bindings/lib/serialization_context.h
+++ b/mojo/public/cpp/bindings/lib/serialization_context.h
@@ -12,15 +12,12 @@
#include <vector>
#include "base/macros.h"
-#include "base/memory/ref_counted.h"
#include "mojo/public/cpp/bindings/bindings_export.h"
#include "mojo/public/cpp/bindings/lib/bindings_internal.h"
+#include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
#include "mojo/public/cpp/system/handle.h"
namespace mojo {
-
-class AssociatedGroupController;
-
namespace internal {
// A container for handles during serialization/deserialization.
@@ -57,19 +54,21 @@ class MOJO_CPP_BINDINGS_EXPORT SerializedHandleVector {
// Context information for serialization/deserialization routines.
struct MOJO_CPP_BINDINGS_EXPORT SerializationContext {
SerializationContext();
- explicit SerializationContext(
- scoped_refptr<AssociatedGroupController> in_group_controller);
~SerializationContext();
- // Used to serialize/deserialize associated interface pointers and requests.
- scoped_refptr<AssociatedGroupController> group_controller;
-
// Opaque context pointers returned by StringTraits::SetUpContext().
std::unique_ptr<std::queue<void*>> custom_contexts;
// Stashes handles encoded in a message by index.
SerializedHandleVector handles;
+
+ // The number of ScopedInterfaceEndpointHandles that need to be serialized.
+ // It is calculated by PrepareToSerialize().
+ uint32_t associated_endpoint_count = 0;
+
+ // Stashes ScopedInterfaceEndpointHandles encoded in a message by index.
+ std::vector<ScopedInterfaceEndpointHandle> associated_endpoint_handles;
};
} // namespace internal
« no previous file with comments | « mojo/public/cpp/bindings/lib/serialization.h ('k') | mojo/public/cpp/bindings/lib/serialization_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698