OLD | NEW |
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 {%- for import in imports %} | 8 {%- for import in imports %} |
8 "{{import.module.path}}", | 9 "{{import.module.path}}", |
9 {%- endfor %} | 10 {%- endfor %} |
10 ], function(codec | 11 ], function(codec, validator |
11 {%- for import in imports -%} | 12 {%- for import in imports -%} |
12 , {{import.unique_name}} | 13 , {{import.unique_name}} |
13 {%- endfor -%} | 14 {%- endfor -%} |
14 ) { | 15 ) { |
15 | 16 |
16 {#--- Constants #} | 17 {#--- Constants #} |
17 {% for constant in module.constants %} | 18 {% for constant in module.constants %} |
18 var {{constant.name}} = {{constant.value|expression_to_text}}; | 19 var {{constant.name}} = {{constant.value|expression_to_text}}; |
19 {%- endfor %} | 20 {%- endfor %} |
20 | 21 |
(...skipping 19 matching lines...) Expand all Loading... |
40 {%- endfor %} | 41 {%- endfor %} |
41 {%- for enum in enums %} | 42 {%- for enum in enums %} |
42 exports.{{enum.name}} = {{enum.name}}; | 43 exports.{{enum.name}} = {{enum.name}}; |
43 {%- endfor %} | 44 {%- endfor %} |
44 {%- for struct in structs if struct.exported %} | 45 {%- for struct in structs if struct.exported %} |
45 exports.{{struct.name}} = {{struct.name}}; | 46 exports.{{struct.name}} = {{struct.name}}; |
46 {%- endfor %} | 47 {%- endfor %} |
47 {%- for interface in interfaces %} | 48 {%- for interface in interfaces %} |
48 exports.{{interface.name}}Proxy = {{interface.name}}Proxy; | 49 exports.{{interface.name}}Proxy = {{interface.name}}Proxy; |
49 exports.{{interface.name}}Stub = {{interface.name}}Stub; | 50 exports.{{interface.name}}Stub = {{interface.name}}Stub; |
| 51 exports.validate{{interface.name}}Request = validate{{interface.name}}Request; |
| 52 exports.validate{{interface.name}}Response = validate{{interface.name}}Respons
e; |
50 {%- endfor %} | 53 {%- endfor %} |
51 return exports; | 54 return exports; |
52 }); | 55 }); |
OLD | NEW |