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

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

Issue 2891193002: Mojo JS bindings: switch all mojo/ layout tests to use the new mode. (Closed)
Patch Set: . Created 3 years, 7 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/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 5f50257912780d7ad87847586a73fcf00896ec73..4b7d65ca483d96945e7801720db31f4ffb735a78 100644
--- a/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl
@@ -9,15 +9,15 @@
handleOrPtrInfo);
}
- function Associated{{interface.name}}Ptr(associatedInterfacePtrInfo) {
+ function {{interface.name}}AssociatedPtr(associatedInterfacePtrInfo) {
this.ptr = new associatedBindings.AssociatedInterfacePtrController(
{{interface.name}}, associatedInterfacePtrInfo);
}
- Associated{{interface.name}}Ptr.prototype =
+ {{interface.name}}AssociatedPtr.prototype =
Object.create({{interface.name}}Ptr.prototype);
- Associated{{interface.name}}Ptr.prototype.constructor =
- Associated{{interface.name}}Ptr;
+ {{interface.name}}AssociatedPtr.prototype.constructor =
+ {{interface.name}}AssociatedPtr;
function {{interface.name}}Proxy(receiver) {
this.receiver_ = receiver;
@@ -42,7 +42,7 @@
{%- endfor %}
{%- if method.response_parameters == None %}
-{%- if method|method_passes_associated_kinds and not use_new_js_bindings %}
+{%- if method|method_passes_associated_kinds %}
var builder = new codec.MessageV2Builder(
k{{interface_method_id}}_Name,
codec.align({{interface_method_id}}_Params.encodedSize));
@@ -57,7 +57,7 @@
this.receiver_.accept(message);
{%- else %}
return new Promise(function(resolve, reject) {
-{%- if method|method_passes_associated_kinds and not use_new_js_bindings %}
+{%- if method|method_passes_associated_kinds %}
var builder = new codec.MessageV2Builder(
k{{interface_method_id}}_Name,
codec.align({{interface_method_id}}_Params.encodedSize),
@@ -134,7 +134,7 @@ params.{{parameter.name}}{% if not loop.last %}, {% endif -%}
{%- for parameter in method.response_parameters %}
responseParams.{{parameter.name}} = response.{{parameter.name}};
{%- endfor %}
-{%- if method|method_passes_associated_kinds and not use_new_js_bindings %}
+{%- if method|method_passes_associated_kinds %}
var builder = new codec.MessageV2Builder(
k{{interface_method_id}}_Name,
codec.align({{interface_method_id}}_ResponseParams
« no previous file with comments | « mojo/public/js/new_bindings/validator.js ('k') | mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698