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

Unified Diff: third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl

Issue 1019173002: Update mojo sdk to rev 7214b7ec7d27563b2666afad86cf1c5895c56c18 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep permission service alive if embedder drops requests Created 5 years, 9 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: third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl b/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
index 7538e8bf5e96876a87e51d7ea9b2ff0ab11a1a20..4d3f54dbc13e53b48f1541c56f55db2a39107d9b 100644
--- a/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
+++ b/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
@@ -135,5 +135,12 @@ class {{struct|name}} extends bindings.Struct {
{%- endfor %}
{%- endfor %}
}
+
+ String toString() {
+ return "{{struct|name}}("
+{%- for packed_field in struct.packed.packed_fields %}
+ "{{packed_field.field|name}}: ${{packed_field.field|name}}" {% if not loop.last %}", "{% endif %}
+{%- endfor %}")";
+ }
}
{%- endmacro %}

Powered by Google App Engine
This is Rietveld 408576698