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

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

Issue 2006093002: Dart: Futures -> Callbacks. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 4 years, 6 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
« no previous file with comments | « mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl b/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
index 69da1aad4dbb8dd06040b7af20a8e18e42595ff8..1f64e6967c23eced1bc33c1483a0f518bcc11bf8 100644
--- a/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
@@ -26,6 +26,12 @@ class {{struct|name}} extends bindings.Struct {
{{struct|name}}() : super(kVersions.last.size);
+ {{struct|name}}.init(
+{%- for packed_field in struct.packed.packed_fields %}
+ {{packed_field.field.kind|dart_type}} this.{{packed_field.field|name}}{% if not loop.last %}, {% endif %}
+{%- endfor %}
+ ) : super(kVersions.last.size);
+
static {{struct|name}} deserialize(bindings.Message message) {
var decoder = new bindings.Decoder(message);
var result = decode(decoder);
« no previous file with comments | « mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698