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

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

Issue 1968623002: Mojo C++ bindings: expose public <struct>DataView and StringDataView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@25_totally_new
Patch Set: Created 4 years, 7 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/module.cc.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
index e7e38548fecc5774d1bb35f961cb89795d491e60..7d9870a2ba83e4685d61654c224ffe3c18c9c781 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
@@ -96,6 +96,24 @@ const uint32_t {{method_name}} = {{method.ordinal}};
} // namespace internal
+namespace {
+
+{#--- Interface parameter data view definitions #}
+{%- for interface in interfaces %}
+{%- for method in interface.methods %}
+{% set struct = method.param_struct %}
+{% include "struct_data_view_declaration.tmpl" %}
+{% include "struct_data_view_definition.tmpl" %}
+{%- if method.response_parameters != None %}
+{%- set struct = method.response_param_struct %}
+{% include "struct_data_view_declaration.tmpl" %}
+{% include "struct_data_view_definition.tmpl" %}
+{%- endif %}
+{%- endfor %}
+{%- endfor %}
+
+} // namespace
+
{#--- Struct Constants #}
{%- for struct in structs %}
{%- for constant in struct.constants %}
@@ -111,6 +129,7 @@ const {{constant.kind|cpp_pod_type}} {{struct.name}}::{{constant.name}} = {{cons
{%- for struct in structs %}
{%- if not struct|is_native_only_kind %}
{%- include "wrapper_class_definition.tmpl" %}
+{%- include "struct_data_view_definition.tmpl" %}
{%- endif %}
{%- endfor %}

Powered by Google App Engine
This is Rietveld 408576698