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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl

Issue 1475813002: Mojo C++ bindings: support passing associated interface pointers/requests in method parameter lists… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@25_use_multiplex_router
Patch Set: Created 5 years, 1 month 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/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl
index 696de8eb0b14e14eaa8bf488b7f527b3dec980d8..7f53e813a67220b9635d3b1b65af62f2fb0a5a5a 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl
@@ -94,7 +94,8 @@ void SerializeUnion_({{union.name}}Ptr input, mojo::internal::Buffer* buf,
}
void Deserialize_(internal::{{union.name}}_Data* input,
- {{union.name}}Ptr* output) {
+ {{union.name}}Ptr* output,
+ mojo::internal::SerializationContext* context) {
if (input && !input->is_null()) {
{{union.name}}Ptr result({{union.name}}::New());
mojo::internal::UnionAccessor<{{union.name}}> result_acc(result.get());
@@ -103,7 +104,7 @@ void Deserialize_(internal::{{union.name}}_Data* input,
case {{union.name}}::Tag::{{field.name|upper}}: {
{% if field.kind|is_object_kind %}
result_acc.SwitchActive({{union.name}}::Tag::{{field.name|upper}});
- Deserialize_(input->data.f_{{field.name}}.ptr, result_acc.data()->{{field.name}});
+ Deserialize_(input->data.f_{{field.name}}.ptr, result_acc.data()->{{field.name}}, context);
{% elif field.kind|is_any_handle_kind %}
{{field.kind|cpp_wrapper_type}}* {{field.name}} =
reinterpret_cast<{{field.kind|cpp_wrapper_type}}*>(&input->data.f_{{field.name}});
« no previous file with comments | « mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698