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

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

Issue 628763002: Mojo JS bindings: simplify mojo.connectToService() usage - Part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 define("{{module.path}}", [ 5 define("{{module.path}}", [
6 "mojo/public/js/bindings/codec", 6 "mojo/public/js/bindings/codec",
7 "mojo/public/js/bindings/validator", 7 "mojo/public/js/bindings/validator",
8 {%- for import in imports %} 8 {%- for import in imports %}
9 "{{import.module.path}}", 9 "{{import.module.path}}",
10 {%- endfor %} 10 {%- endfor %}
(...skipping 28 matching lines...) Expand all
39 {%- for constant in module.constants %} 39 {%- for constant in module.constants %}
40 exports.{{constant.name}} = {{constant.name}}; 40 exports.{{constant.name}} = {{constant.name}};
41 {%- endfor %} 41 {%- endfor %}
42 {%- for enum in enums %} 42 {%- for enum in enums %}
43 exports.{{enum.name}} = {{enum.name}}; 43 exports.{{enum.name}} = {{enum.name}};
44 {%- endfor %} 44 {%- endfor %}
45 {%- for struct in structs if struct.exported %} 45 {%- for struct in structs if struct.exported %}
46 exports.{{struct.name}} = {{struct.name}}; 46 exports.{{struct.name}} = {{struct.name}};
47 {%- endfor %} 47 {%- endfor %}
48 {%- for interface in interfaces %} 48 {%- for interface in interfaces %}
49 exports.{{interface.name}}Proxy = {{interface.name}}Proxy; 49 exports.{{interface.name}} = {
Matt Perry 2014/10/03 22:57:49 I think this block belongs in interface_definition
hansmuller 2014/10/06 19:05:19 Done.
50 exports.{{interface.name}}Stub = {{interface.name}}Stub; 50 name: '{{namespace|replace(".","::")}}::{{interface.name}}',
51 proxyClass: {{interface.name}}Proxy,
52 stubClass: {{interface.name}}Stub,
53 validateRequest: validate{{interface.name}}Request,
54 {%- if interface|has_callbacks %}
55 validateResponse: validate{{interface.name}}Response,
56 {%- else %}
57 validateResponse: null,
58 {%- endif %}
59 };
60 {%- endfor %}
61 {%- for interface in interfaces %}
62 {%- if interface.client in interfaces|map(attribute='name') %}
63 exports.{{interface.name}}.client = exports.{{interface.client}};
64 {%- endif %}
51 {%- endfor %} 65 {%- endfor %}
52 return exports; 66 return exports;
53 }); 67 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698