| 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 2367a585e0b31bb0916ddaae618b2a215c95f279..f10ff5078f4ce05f244d46707d7846fea347f49b 100644
|
| --- a/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl
|
| @@ -15,19 +15,22 @@ const int _{{interface|name}}_{{method|name}}Name = {{method.ordinal}};
|
| class _{{interface|name}}ServiceDescription implements {{descpkg}}ServiceDescription {
|
| {%- if should_gen_mojom_types %}
|
| dynamic getTopLevelInterface([Function responseFactory]) =>
|
| - _{{interface|mojom_type_identifier|lower_camel}}();
|
| + responseFactory(_{{interface|mojom_type_identifier|lower_camel}}());
|
|
|
| dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
|
| - getAllMojomTypeDefinitions()[typeKey];
|
| + responseFactory(getAllMojomTypeDefinitions()[typeKey]);
|
|
|
| dynamic getAllTypeDefinitions([Function responseFactory]) =>
|
| - getAllMojomTypeDefinitions();
|
| + responseFactory(getAllMojomTypeDefinitions());
|
| {%- else %}
|
| - dynamic getTopLevelInterface([Function responseFactory]) => null;
|
| + dynamic getTopLevelInterface([Function responseFactory]) =>
|
| + responseFactory(null);
|
|
|
| - dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null;
|
| + dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
|
| + responseFactory(null);
|
|
|
| - dynamic getAllTypeDefinitions([Function responseFactory]) => null;
|
| + dynamic getAllTypeDefinitions([Function responseFactory]) =>
|
| + responseFactory(null);
|
| {%- endif %}
|
| }
|
|
|
| @@ -325,6 +328,6 @@ class {{interface|name}}Stub extends bindings.Stub {
|
|
|
| int get version => {{interface.version}};
|
|
|
| - {{descpkg}}ServiceDescription get serviceDescription =>
|
| + static {{descpkg}}ServiceDescription get serviceDescription =>
|
| new _{{interface|name}}ServiceDescription();
|
| }
|
|
|