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

Side by Side Diff: mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl

Issue 2754003005: Mojo C++ Bindings: fix mojom::Foo::Deserialize() for component build. (Closed)
Patch Set: . Created 3 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 unified diff | Download patch
« no previous file with comments | « mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {% for constructor in struct|struct_constructors %} 1 {% for constructor in struct|struct_constructors %}
2 {{struct.name}}::{{struct.name}}( 2 {{struct.name}}::{{struct.name}}(
3 {%- for field in constructor.params %} 3 {%- for field in constructor.params %}
4 {%- set type = field.kind|cpp_wrapper_param_type %} 4 {%- set type = field.kind|cpp_wrapper_param_type %}
5 {%- set name = field.name %} 5 {%- set name = field.name %}
6 {{type}} {{name}}_in 6 {{type}} {{name}}_in
7 {%- if not loop.last -%},{%- endif %} 7 {%- if not loop.last -%},{%- endif %}
8 {%- endfor %}) 8 {%- endfor %})
9 {%- for field, is_parameter in constructor.fields %} 9 {%- for field, is_parameter in constructor.fields %}
10 {%- set name = field.name %} 10 {%- set name = field.name %}
(...skipping 13 matching lines...) Expand all
24 {%- for field in struct.fields %} 24 {%- for field in struct.fields %}
25 {%- if for_blink %} 25 {%- if for_blink %}
26 seed = mojo::internal::WTFHash(seed, this->{{field.name}}); 26 seed = mojo::internal::WTFHash(seed, this->{{field.name}});
27 {%- else %} 27 {%- else %}
28 seed = mojo::internal::Hash(seed, this->{{field.name}}); 28 seed = mojo::internal::Hash(seed, this->{{field.name}});
29 {%- endif %} 29 {%- endif %}
30 {%- endfor %} 30 {%- endfor %}
31 return seed; 31 return seed;
32 } 32 }
33 {%- endif %} 33 {%- endif %}
34
35 bool {{struct.name}}::Validate(
36 const void* data,
37 mojo::internal::ValidationContext* validation_context) {
38 return Data_::Validate(data, validation_context);
39 }
OLDNEW
« no previous file with comments | « mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698