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

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

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase ontop of master, address trung's comments Created 4 years, 10 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/tools/bindings/generators/cpp_templates/struct_macros.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl
index 645229ff51faa68626cb35f2acf759cba4679a9e..c0b79e6e22c1c89ca25535ef60c1fb98cd479f3c 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl
@@ -181,7 +181,8 @@
{%- endif %}
{%- elif kind|is_any_handle_kind or kind|is_interface_kind %}
{%- if kind|is_interface_kind %}
- mojo::internal::InterfacePointerToData({{input_field}}.Pass(), &{{output}}->{{name}});
+ mojo::internal::InterfaceHandleToData({{input_field}}.Pass(),
+ &{{output}}->{{name}});
{%- elif kind|is_interface_request_kind %}
{{output}}->{{name}} = {{input_field}}.PassMessagePipe().release();
{%- else %}
@@ -253,7 +254,7 @@
Deserialize_({{input}}->{{name}}.ptr, &{{output_field}});
{%- endif %}
{%- elif kind|is_interface_kind %}
- mojo::internal::InterfaceDataToPointer(&{{input}}->{{name}}, &{{output_field}});
+ mojo::internal::InterfaceDataToHandle(&{{input}}->{{name}}, &{{output_field}});
{%- elif kind|is_interface_request_kind %}
{{output_field}}.Bind(mojo::MakeScopedHandle(mojo::internal::FetchAndReset(&{{input}}->{{name}})));
{%- elif kind|is_any_handle_kind %}

Powered by Google App Engine
This is Rietveld 408576698