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

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

Issue 844433003: Revert "Generate some of the C++ bindings for mojom tagged unions." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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
Index: mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
index 58a1e9fd36f9f77e02a23c48ed4b63ab6ea1c510..3da6c324bdff6706558257caa6aad4eb213efc5c 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
@@ -53,16 +53,6 @@ typedef mojo::StructPtr<{{struct.name}}> {{struct.name}}Ptr;
{% endif %}
{% endfor %}
-{#--- Union Forward Declarations -#}
-{% for union in unions %}
-class {{union.name}};
-{% if union|should_inline %}
-typedef mojo::InlinedStructPtr<{{union.name}}> {{union.name}}Ptr;
-{% else %}
-typedef mojo::StructPtr<{{union.name}}> {{union.name}}Ptr;
-{% endif %}
-{%- endfor %}
-
{#--- NOTE: Non-inlined structs may have pointers to inlined structs, so we #}
{#--- need to fully define inlined structs ahead of the others. #}
@@ -80,11 +70,6 @@ typedef mojo::StructPtr<{{union.name}}> {{union.name}}Ptr;
{% endif %}
{%- endfor %}
-{#--- Unions #}
-{% for union in unions %}
-{% include "wrapper_union_class_declaration.tmpl" %}
-{%- endfor %}
-
{#--- Interfaces -#}
{% for interface in interfaces %}
{% include "interface_declaration.tmpl" %}
@@ -110,18 +95,10 @@ typedef mojo::StructPtr<{{union.name}}> {{union.name}}Ptr;
{% include "interface_response_validator_declaration.tmpl" %}
{%- endfor %}
-{%- import "serialization_macros.tmpl" as serialization_macros %}
{#--- Struct Serialization Helpers -#}
{% if structs %}
{% for struct in structs %}
-{{ serialization_macros.declare_serialization(struct.name) }}
-{%- endfor %}
-{%- endif %}
-
-{#--- Union Serialization Helpers -#}
-{% if unions %}
-{% for union in unions %}
-{{ serialization_macros.declare_serialization(union.name) }}
+{% include "struct_serialization_declaration.tmpl" %}
{%- endfor %}
{%- endif %}

Powered by Google App Engine
This is Rietveld 408576698