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

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

Issue 2578333002: Mojo JS bindings: BindingSet support. (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 unified diff | Download patch
« no previous file with comments | « mojo/public/js/connection.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {%- for method in interface.methods %} 1 {%- for method in interface.methods %}
2 var k{{interface.name}}_{{method.name}}_Name = {{method.ordinal}}; 2 var k{{interface.name}}_{{method.name}}_Name = {{method.ordinal}};
3 {%- endfor %} 3 {%- endfor %}
4 4
5 function {{interface.name}}Ptr() { 5 function {{interface.name}}Ptr(handleOrPtrInfo) {
6 this.ptr = new bindings.InterfacePtrController({{interface.name}}); 6 this.ptr = new bindings.InterfacePtrController({{interface.name}},
7 handleOrPtrInfo);
7 } 8 }
8 9
9 function {{interface.name}}Proxy(receiver) { 10 function {{interface.name}}Proxy(receiver) {
10 bindings.ProxyBase.call(this, receiver); 11 bindings.ProxyBase.call(this, receiver);
11 } 12 }
12 {{interface.name}}Proxy.prototype = Object.create(bindings.ProxyBase.prototype ); 13 {{interface.name}}Proxy.prototype = Object.create(bindings.ProxyBase.prototype );
13 14
14 {%- for method in interface.methods %} 15 {%- for method in interface.methods %}
15 {{interface.name}}Ptr.prototype.{{method.name|stylize_method}} = function() { 16 {{interface.name}}Ptr.prototype.{{method.name|stylize_method}} = function() {
16 return {{interface.name}}Proxy.prototype.{{method.name|stylize_method}} 17 return {{interface.name}}Proxy.prototype.{{method.name|stylize_method}}
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 {%- from "enum_definition.tmpl" import enum_def -%} 190 {%- from "enum_definition.tmpl" import enum_def -%}
190 {%- for enum in interface.enums %} 191 {%- for enum in interface.enums %}
191 {{ enum_def("%s.%s"|format(interface.name, enum.name), enum) }} 192 {{ enum_def("%s.%s"|format(interface.name, enum.name), enum) }}
192 {%- endfor %} 193 {%- endfor %}
193 {{interface.name}}Stub.prototype.validator = validate{{interface.name}}Request ; 194 {{interface.name}}Stub.prototype.validator = validate{{interface.name}}Request ;
194 {%- if interface|has_callbacks %} 195 {%- if interface|has_callbacks %}
195 {{interface.name}}Proxy.prototype.validator = validate{{interface.name}}Respon se; 196 {{interface.name}}Proxy.prototype.validator = validate{{interface.name}}Respon se;
196 {%- else %} 197 {%- else %}
197 {{interface.name}}Proxy.prototype.validator = null; 198 {{interface.name}}Proxy.prototype.validator = null;
198 {%- endif %} 199 {%- endif %}
OLDNEW
« no previous file with comments | « mojo/public/js/connection.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698