Chromium Code Reviews| Index: mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl |
| diff --git a/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl b/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl |
| index 8dc7d873f73db1c2a1a69f29676ed0f7b46332a5..433f1e383e566bcd63b696d9d4a9ca2473877955 100644 |
| --- a/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl |
| +++ b/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl |
| @@ -8,14 +8,13 @@ const int _{{interface|name}}_{{method|name}}Name = {{method.ordinal}}; |
| {{ enum_def(enum, typepkg, package) }} |
| {%- endfor %} |
| -{% if should_gen_mojom_types -%} |
| -{{ mojom_type_macros.writeMojomTypeDef(interface, typepkg, package) }} |
| -{%- endif %} |
| - |
| class _{{interface|name}}ServiceDescription implements {{descpkg}}ServiceDescription { |
| -{%- if should_gen_mojom_types %} |
| - dynamic getTopLevelInterface([Function responseFactory]) => |
| - responseFactory(_{{interface|mojom_type_identifier|lower_camel}}()); |
| +{%- if should_gen_mojom_types and interface.service_name %} |
|
alexfandrianto
2016/03/02 05:27:12
It may be worth noting explicitly in the CL descri
rudominer
2016/03/03 01:09:36
Good suggestion. Done.
|
| + dynamic getTopLevelInterface([Function responseFactory]){ |
| + var interfaceTypeKey = getRuntimeTypeInfo().servicesByName["{{interface.service_name}}"].topLevelInterface; |
| + var userDefinedType = getAllMojomTypeDefinitions()[interfaceTypeKey]; |
| + return responseFactory(userDefinedType.interfaceType); |
| + } |
| dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
| responseFactory(getAllMojomTypeDefinitions()[typeKey]); |