Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1740)

Unified Diff: mojo/public/tools/bindings/generators/js_templates/module.js.tmpl

Issue 628763002: Mojo JS bindings: simplify mojo.connectToService() usage - Part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed template indentation Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..397a12054624925bf573cdbca83aa26e2878f910 100644
--- a/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl
+++ b/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl
@@ -22,7 +22,7 @@ define("{{module.path}}", [
{#--- Enums #}
{%- from "enum_definition.tmpl" import enum_def %}
{%- for enum in enums %}
- var {{ enum_def(enum.name, enum, module) }}
+ var {{ enum_def(enum.name, enum) }}
{%- endfor %}
{#--- Struct definitions #}
@@ -46,8 +46,12 @@ 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}} = {{interface.name}};
+{#--- Interface Client #}
+{%- if interface.client in interfaces|map(attribute='name') %}
+ exports.{{interface.name}}.client = {{interface.client}};
+{%- endif %}
{%- endfor %}
+
return exports;
});

Powered by Google App Engine
This is Rietveld 408576698