| Index: third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl
|
| diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl b/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl
|
| index f995e0bb885c81647430cfd618e9cbdce4c1a84b..cdfc0ab2709514b938c5882bd3e16dd315265cb6 100644
|
| --- a/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl
|
| +++ b/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl
|
| @@ -9,8 +9,8 @@ class {{interface.name}}ResponseValidator;
|
|
|
| class {{interface.name}} {
|
| public:
|
| - static const char* Name_;
|
| - static const uint32_t Version_;
|
| + static const char Name_[];
|
| + static const uint32_t Version_ = {{interface.version}};
|
|
|
| using Proxy_ = {{interface.name}}Proxy;
|
| using Stub_ = {{interface.name}}Stub;
|
| @@ -22,17 +22,21 @@ class {{interface.name}} {
|
| using ResponseValidator_ = mojo::PassThroughFilter;
|
| {%- endif %}
|
|
|
| -{#--- Constants #}
|
| -{%- for constant in interface.constants %}
|
| - static const {{constant.kind|cpp_pod_type}} {{constant.name}};
|
| -{%- endfor %}
|
| -
|
| {#--- Enums #}
|
| {%- for enum in interface.enums %}
|
| {% macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %}
|
| {{enum_def()|indent(2)}}
|
| {%- endfor %}
|
|
|
| +{#--- Constants #}
|
| +{%- for constant in interface.constants %}
|
| +{%- if constant.kind|is_integral_kind %}
|
| + static const {{constant.kind|cpp_pod_type}} {{constant.name}} = {{constant|constant_value}};
|
| +{%- else %}
|
| + static const {{constant.kind|cpp_pod_type}} {{constant.name}};
|
| +{%- endif %}
|
| +{%- endfor %}
|
| +
|
| {#--- Methods #}
|
| virtual ~{{interface.name}}() {}
|
|
|
|
|