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

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

Issue 278093003: Break dependency on core from generated mojom.js files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Specialize Converter<gin::Handle<gin::HandleWrapper> > Created 6 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 unified diff | Download patch | Annotate | Revision Log
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/core",
7 "mojo/public/js/bindings/codec", 6 "mojo/public/js/bindings/codec",
8 {%- for import in imports %} 7 {%- for import in imports %}
9 "{{import.module.path}}", 8 "{{import.module.path}}",
10 {%- endfor %} 9 {%- endfor %}
11 ], function(core, codec 10 ], function(codec
12 {%- for import in imports -%} 11 {%- for import in imports -%}
13 , {{import.unique_name}} 12 , {{import.unique_name}}
14 {%- endfor -%} 13 {%- endfor -%}
15 ) { 14 ) {
16 15
17 {#--- Enums #} 16 {#--- Enums #}
18 {% from "enum_definition.tmpl" import enum_def -%} 17 {% from "enum_definition.tmpl" import enum_def -%}
19 {% for enum in enums %} 18 {% for enum in enums %}
20 var {{ enum_def(enum.name, enum, module) }} 19 var {{ enum_def(enum.name, enum, module) }}
21 {%- endfor %} 20 {%- endfor %}
(...skipping 14 matching lines...) Expand all
36 {%- endfor %} 35 {%- endfor %}
37 {%- for struct in structs if struct.exported %} 36 {%- for struct in structs if struct.exported %}
38 exports.{{struct.name}} = {{struct.name}}; 37 exports.{{struct.name}} = {{struct.name}};
39 {%- endfor %} 38 {%- endfor %}
40 {%- for interface in interfaces %} 39 {%- for interface in interfaces %}
41 exports.{{interface.name}}Proxy = {{interface.name}}Proxy; 40 exports.{{interface.name}}Proxy = {{interface.name}}Proxy;
42 exports.{{interface.name}}Stub = {{interface.name}}Stub; 41 exports.{{interface.name}}Stub = {{interface.name}}Stub;
43 {%- endfor %} 42 {%- endfor %}
44 return exports; 43 return exports;
45 }); 44 });
OLDNEW
« no previous file with comments | « mojo/public/js/bindings/connector.js ('k') | mojo/public/tools/bindings/generators/mojom_js_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698