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
3 // found in the LICENSE file.
5 define("{{module.path}}", [
6 "mojo/public/js/bindings/codec",
7 "mojo/public/js/bindings/validator",
8 {%- for import in imports %}
9 "{{import.module.path}}",
11 ], function(codec, validator
12 {%- for import in imports -%}
13 , {{import.unique_name}}
18 {% for constant in module.constants %}
19 var {{constant.name}} = {{constant.value|expression_to_text}};
23 {%- from "enum_definition.tmpl" import enum_def %}
24 {%- for enum in enums %}
25 var {{ enum_def(enum.name, enum, module) }}
28 {#--- Struct definitions #}
29 {% for struct in structs %}
30 {%- include "struct_definition.tmpl" %}
33 {#--- Interface definitions #}
34 {%- for interface in interfaces -%}
35 {%- include "interface_definition.tmpl" %}
39 {%- for constant in module.constants %}
40 exports.{{constant.name}} = {{constant.name}};
42 {%- for enum in enums %}
43 exports.{{enum.name}} = {{enum.name}};
45 {%- for struct in structs if struct.exported %}
46 exports.{{struct.name}} = {{struct.name}};
48 {%- for interface in interfaces %}
49 exports.{{interface.name}}Proxy = {{interface.name}}Proxy;
50 exports.{{interface.name}}Stub = {{interface.name}}Stub;