Index: mojo/public/tools/bindings/generators/js_templates/module.js.tmpl |
diff --git a/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl b/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl |
index 93fa537023dddb7683fe24bab0a297244c3b32e6..9d3b4e440cb05f8c295c6f471446cfe70817d6e1 100644 |
--- a/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl |
+++ b/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl |
@@ -46,8 +46,22 @@ define("{{module.path}}", [ |
exports.{{struct.name}} = {{struct.name}}; |
{%- endfor %} |
{%- for interface in interfaces %} |
- exports.{{interface.name}}Proxy = {{interface.name}}Proxy; |
- exports.{{interface.name}}Stub = {{interface.name}}Stub; |
+ exports.{{interface.name}} = { |
Matt Perry
2014/10/03 22:57:49
I think this block belongs in interface_definition
hansmuller
2014/10/06 19:05:19
Done.
|
+ name: '{{namespace|replace(".","::")}}::{{interface.name}}', |
+ proxyClass: {{interface.name}}Proxy, |
+ stubClass: {{interface.name}}Stub, |
+ validateRequest: validate{{interface.name}}Request, |
+{%- if interface|has_callbacks %} |
+ validateResponse: validate{{interface.name}}Response, |
+{%- else %} |
+ validateResponse: null, |
+{%- endif %} |
+ }; |
+{%- endfor %} |
+{%- for interface in interfaces %} |
+{%- if interface.client in interfaces|map(attribute='name') %} |
+ exports.{{interface.name}}.client = exports.{{interface.client}}; |
+{%- endif %} |
{%- endfor %} |
return exports; |
}); |