Chromium Code Reviews| Index: mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl |
| diff --git a/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl |
| index c8298d9501f005cd830c1721168d17582f33d429..f2fa9acb362125f875b24daa9a542745d930a8b5 100644 |
| --- a/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl |
| +++ b/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl |
| @@ -29,6 +29,16 @@ class {{export_attribute}} {{interface.name}} |
| using ResponseValidator_ = mojo::PassThroughFilter; |
| {%- endif %} |
| +{#--- Metadata #} |
| + enum kMethodIndices : uint32_t { |
|
yzshen1
2016/12/22 18:53:28
For Foo.Bar(), we already have "const uint32_t int
|
| +{%- for method in interface.methods %} |
| + k{{method.name}}MethodIndex, |
| +{%- endfor %} |
| + kMethodMetadataSize |
| + }; |
| + |
| + static const mojo::MethodMetadata kMethodMetadata[]; |
| + |
| {#--- Enums #} |
| {%- for enum in interface.enums %} |
| using {{enum.name}} = {{enum|get_name_for_kind(flatten_nested_kind=True)}}; |