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

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

Issue 637373002: Mojo JS bindings: simplify mojo.connectToService() usage - Part 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed the mojo_internals module, made Connection localFactory optional 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 397a12054624925bf573cdbca83aa26e2878f910..058bc1e70d0349ff66f831b1f7849fbc6e929d57 100644
--- a/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl
+++ b/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl
@@ -50,6 +50,8 @@ define("{{module.path}}", [
{#--- Interface Client #}
{%- if interface.client in interfaces|map(attribute='name') %}
exports.{{interface.name}}.client = {{interface.client}};
+{%- elif interface.client in imported_interfaces %}
+ exports.{{interface.name}}.client = {{imported_interfaces[interface.client]}};
{%- endif %}
{%- endfor %}

Powered by Google App Engine
This is Rietveld 408576698