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

Side by Side Diff: mojo/public/tools/bindings/generators/cpp_templates/union_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 {%- import "validation_macros.tmpl" as validation_macros %} 1 {%- import "validation_macros.tmpl" as validation_macros %}
2 {%- set class_name = union.name ~ "_Data" %} 2 {%- set class_name = union.name ~ "_Data" %}
3 {%- set enum_name = union.name ~ "_Tag" -%} 3 {%- set enum_name = union.name ~ "_Tag" -%}
4 4
5 // static 5 // static
6 {{class_name}}* {{class_name}}::New(mojo::internal::Buffer* buf) { 6 {{class_name}}* {{class_name}}::New(mojo::internal::Buffer* buf) {
7 return new (buf->Allocate(sizeof({{class_name}}))) {{class_name}}(); 7 return new (buf->Allocate(sizeof({{class_name}}))) {{class_name}}();
8 } 8 }
9 9
10 // static 10 // static
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 {%- elif field.kind|is_interface_kind %} 87 {%- elif field.kind|is_interface_kind %}
88 mojo::internal::DecodeHandle( 88 mojo::internal::DecodeHandle(
89 reinterpret_cast<mojo::internal::Interface_Data*>( 89 reinterpret_cast<mojo::internal::Interface_Data*>(
90 &data.f_{{field.name}}), handles); 90 &data.f_{{field.name}}), handles);
91 {%- endif %} 91 {%- endif %}
92 return; 92 return;
93 } 93 }
94 {%- endfor %} 94 {%- endfor %}
95 } 95 }
96 } 96 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698