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

Side by Side Diff: mojo/public/tools/bindings/generators/js_templates/struct_definition.tmpl

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 {#--- Begin #} 1 {#--- Begin #}
2 function {{struct.name}}(values) { 2 function {{struct.name}}(values) {
3 this.initDefaults_(); 3 this.initDefaults_();
4 this.initFields_(values); 4 this.initFields_(values);
5 } 5 }
6 6
7 {#--- Enums #} 7 {#--- Enums #}
8 {%- from "enum_definition.tmpl" import enum_def %} 8 {%- from "enum_definition.tmpl" import enum_def %}
9 {% for enum in struct.enums %} 9 {% for enum in struct.enums %}
10 {{enum_def("%s.%s"|format(struct.name, enum.name), enum)}} 10 {{enum_def("%s.%s"|format(struct.name, enum.name), enum)}}
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 {%- else %} 91 {%- else %}
92 {%- for packed_field in byte.packed_fields %} 92 {%- for packed_field in byte.packed_fields %}
93 encoder.{{packed_field.field.kind|encode_snippet}}val.{{packed_field.field.n ame}}); 93 encoder.{{packed_field.field.kind|encode_snippet}}val.{{packed_field.field.n ame}});
94 {%- endfor %} 94 {%- endfor %}
95 {%- endif %} 95 {%- endif %}
96 {%- if byte.is_padding %} 96 {%- if byte.is_padding %}
97 encoder.skip(1); 97 encoder.skip(1);
98 {%- endif %} 98 {%- endif %}
99 {%- endfor %} 99 {%- endfor %}
100 }; 100 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698