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

Unified Diff: mojo/public/tools/bindings/generators/dart_templates/union_definition.tmpl

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Move and Standardize Mojom Type Functions Created 4 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/dart_templates/union_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/dart_templates/union_definition.tmpl b/mojo/public/tools/bindings/generators/dart_templates/union_definition.tmpl
index 349100007993b2b0f03702eff9866ebe0dfa3c93..40fb7bcfe4a00333feae5506701d61b4192c992a 100644
--- a/mojo/public/tools/bindings/generators/dart_templates/union_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/dart_templates/union_definition.tmpl
@@ -1,6 +1,7 @@
{#--- Begin #}
{%- import "encoding_macros.tmpl" as encoding_macros %}
+{% import "mojom_type_macros.tmpl" as mojom_type_macros %}
{%- macro enum_def(union) %}
enum {{union|name}}Tag {
@@ -108,7 +109,9 @@ class {{union|name}} extends bindings.Union {
{%- endmacro %}
-{%- macro union_def(union) %}
+{%- macro union_def(union, typepkg, package) %}
{{enum_def(union)}}
{{wrapper_def(union)}}
+
zra 2016/01/27 18:15:12 I wonder if extra newlines like this one might be
alexfandrianto 2016/01/28 03:45:13 Done.
+{{ mojom_type_macros.writeMojomTypeDef(union, typepkg, package) }}
{%- endmacro %}

Powered by Google App Engine
This is Rietveld 408576698