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

Side by Side Diff: mojo/public/tools/bindings/generators/cpp_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 {%- set class_name = struct.name ~ "_Data" %} 1 {%- set class_name = struct.name ~ "_Data" %}
2 2
3 {#- TODO(yzshen): Consider eliminating _validate_object() and 3 {#- TODO(yzshen): Consider eliminating _validate_object() and
4 _validate_handle(). #} 4 _validate_handle(). #}
5 5
6 {#- Validates the specified struct field, which is supposed to be an object 6 {#- Validates the specified struct field, which is supposed to be an object
7 (struct/array/string/map/union). 7 (struct/array/string/map/union).
8 This macro is expanded by the Validate() method. #} 8 This macro is expanded by the Validate() method. #}
9 {%- macro _validate_object(struct, packed_field) %} 9 {%- macro _validate_object(struct, packed_field) %}
10 {%- set name = packed_field.field.name %} 10 {%- set name = packed_field.field.name %}
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 mojo::internal::DecodeHandle(&{{name}}, handles); 202 mojo::internal::DecodeHandle(&{{name}}, handles);
203 {%- endif %} 203 {%- endif %}
204 {%- endif %} 204 {%- endif %}
205 {%- endfor %} 205 {%- endfor %}
206 } 206 }
207 207
208 {{class_name}}::{{class_name}}() { 208 {{class_name}}::{{class_name}}() {
209 header_.num_bytes = sizeof(*this); 209 header_.num_bytes = sizeof(*this);
210 header_.version = {{struct.versions[-1].version}}; 210 header_.version = {{struct.versions[-1].version}};
211 } 211 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698