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

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

Issue 2556353004: Mojo JS bindings: code generator maps interface ptr and request to InterfacePtr and InterfaceReques… (Closed)
Patch Set: . Created 4 years 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/interface_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl b/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl
index 96a241cc46f3b713088c0d0aefbf770a6b19bc7f..9441589ce9e093dd3d629d99377532f427c94bf9 100644
--- a/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl
@@ -24,7 +24,7 @@
) {
var params = new {{interface.name}}_{{method.name}}_Params();
{%- for parameter in method.parameters %}
- params.{{parameter.name}} = {{parameter|js_proxy_method_parameter_value}};
+ params.{{parameter.name}} = {{parameter.name}};
{%- endfor %}
{%- if method.response_parameters == None %}
@@ -64,7 +64,7 @@
{%- set js_method_name = method.name|stylize_method %}
{%- set delegate_expr = "bindings.StubBindings(this).delegate" %}
{{interface.name}}Stub.prototype.{{js_method_name}} = function({{method.parameters|map(attribute='name')|join(', ')}}) {
- return {{delegate_expr}} && {{delegate_expr}}.{{js_method_name}} && {{delegate_expr}}.{{js_method_name}}({{method.parameters|map('js_stub_method_parameter_value')|join(', ')}});
+ return {{delegate_expr}} && {{delegate_expr}}.{{js_method_name}} && {{delegate_expr}}.{{js_method_name}}({{method.parameters|map(attribute='name')|join(', ')}});
}
{%- endfor %}
@@ -171,6 +171,7 @@ params.{{parameter.name}}{% if not loop.last %}, {% endif -%}
var {{interface.name}} = {
name: '{{namespace|replace(".","::")}}::{{interface.name}}',
+ ptrClass: {{interface.name}}Ptr,
proxyClass: {{interface.name}}Proxy,
stubClass: {{interface.name}}Stub,
validateRequest: validate{{interface.name}}Request,

Powered by Google App Engine
This is Rietveld 408576698