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

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

Issue 488173006: Integrate Mojo JS validation bindings with the Router (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final changes Created 6 years, 4 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 62f03ae7e9f7e449f75fab8f3664eb32fc2e5200..b41929c245b4138a7b06d7170b1e048639d9d844 100644
--- a/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl
@@ -157,6 +157,13 @@ params.{{parameter.name}}{% if not loop.last %}, {% endif -%}
{%- endif %}
}
+ {{interface.name}}Stub.prototype.validator = validate{{interface.name}}Request;
+{%- if interface|has_callbacks %}
+ {{interface.name}}Proxy.prototype.validator = validate{{interface.name}}Response;
+{%- else %}
+ {{interface.name}}Proxy.prototype.validator = null;
+{%- endif -%}
+
{#--- Enums #}
{% from "enum_definition.tmpl" import enum_def -%}
{% for enum in interface.enums %}
@@ -168,4 +175,4 @@ params.{{parameter.name}}{% if not loop.last %}, {% endif -%}
{% for constant in interface.constants %}
{{interface.name}}Proxy.{{constant.name}} = {{constant.value|expression_to_text}};
{{interface.name}}Stub.{{constant.name}} = {{interface.name}}Proxy.{{constant.name}};
-{% endfor %}
+{%- endfor %}
« no previous file with comments | « mojo/public/js/bindings/validation_unittests.js ('k') | mojo/public/tools/bindings/generators/js_templates/module.js.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698