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

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

Issue 795593004: Update mojo sdk to rev cc531b32182099a5a034a99daff35ed5d38a61c8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More workarounds for MSVC Created 6 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 50bc6fcb203d3c7238f61f2407667c4db66731a7..ca95e979808f3b8e4e1a8e8958986f45130d24e6 100644
--- a/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl
@@ -6,10 +6,6 @@
connection.initProxyInstance(this, {{interface.name}}, receiver);
}
- {{interface.name}}Proxy.prototype.getConnection$ = function() {
- return connection.getProxyConnection(this, {{interface.name}});
- }
-
{%- for method in interface.methods %}
{{interface.name}}Proxy.prototype.{{method.name|stylize_method}} = function(
{%- for parameter in method.parameters -%}
@@ -18,19 +14,7 @@
) {
var params = new {{interface.name}}_{{method.name}}_Params();
{%- for parameter in method.parameters %}
-{%- if parameter|is_interface_parameter %}
- if ({{parameter.name}} instanceof {{parameter.kind|js_type}}.stubClass)
- params.{{parameter.name}} = {{parameter.name}}.getConnection$().messagePipeHandle;
- else
- params.{{parameter.name}} = {{parameter.name}};
-{%- elif parameter|is_interface_request_parameter %}
- if ({{parameter.name}} instanceof {{parameter.kind.kind|js_type}}.proxyClass)
- params.{{parameter.name}} = {{parameter.name}}.getConnection$().messagePipeHandle;
- else
- params.{{parameter.name}} = {{parameter.name}};
-{%- else %}
- params.{{parameter.name}} = {{parameter.name}};
-{%- endif %}
+ params.{{parameter.name}} = {{parameter|js_proxy_method_parameter_value}};
{%- endfor %}
{%- if method.response_parameters == None %}
@@ -65,10 +49,6 @@
this.delegate$ = delegate;
}
- {{interface.name}}Stub.prototype.getConnection$ = function() {
- return connection.getStubConnection(this, {{interface.name}});
- }
-
{%- for method in interface.methods %}
{% macro stub_method_parameters() -%}
{%- for parameter in method.parameters -%}
@@ -77,7 +57,7 @@
{%- endmacro %}
{{interface.name}}Stub.prototype.{{method.name|stylize_method}} = function({{stub_method_parameters()}}) {
if (this.delegate$.{{method.name|stylize_method}})
- return this.delegate$.{{method.name|stylize_method}}({{stub_method_parameters()}});
+ return this.delegate$.{{method.name|stylize_method}}({{method.parameters|map('js_stub_method_parameter_value')|join(',')}});
}
{%- endfor %}

Powered by Google App Engine
This is Rietveld 408576698