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 {%- set header_guard = "%s_H_"| | 5 {%- set header_guard = "%s_H_"| |
6 format(module.path|upper|replace("/","_")|replace(".","_")) %} | 6 format(module.path|upper|replace("/","_")|replace(".","_")) %} |
7 | 7 |
8 #ifndef {{header_guard}} | 8 #ifndef {{header_guard}} |
9 #define {{header_guard}} | 9 #define {{header_guard}} |
10 | 10 |
11 #include "mojo/public/cpp/bindings/array.h" | 11 #include "mojo/public/cpp/bindings/array.h" |
12 #include "mojo/public/cpp/bindings/callback.h" | 12 #include "mojo/public/cpp/bindings/callback.h" |
13 #include "mojo/public/cpp/bindings/interface_impl.h" | 13 #include "mojo/public/cpp/bindings/interface_impl.h" |
14 #include "mojo/public/cpp/bindings/interface_ptr.h" | 14 #include "mojo/public/cpp/bindings/interface_ptr.h" |
| 15 #include "mojo/public/cpp/bindings/message_filter.h" |
15 #include "mojo/public/cpp/bindings/no_interface.h" | 16 #include "mojo/public/cpp/bindings/no_interface.h" |
16 #include "{{module.path}}-internal.h" | 17 #include "{{module.path}}-internal.h" |
17 {%- for import in imports %} | 18 {%- for import in imports %} |
18 #include "{{import.module.path}}.h" | 19 #include "{{import.module.path}}.h" |
19 {%- endfor %} | 20 {%- endfor %} |
20 | 21 |
21 {%- for namespace in namespaces_as_array %} | 22 {%- for namespace in namespaces_as_array %} |
22 namespace {{namespace}} { | 23 namespace {{namespace}} { |
23 {%- endfor %} | 24 {%- endfor %} |
24 | 25 |
(...skipping 26 matching lines...) Expand all Loading... |
51 {#--- Interface Proxies -#} | 52 {#--- Interface Proxies -#} |
52 {% for interface in interfaces %} | 53 {% for interface in interfaces %} |
53 {% include "interface_proxy_declaration.tmpl" %} | 54 {% include "interface_proxy_declaration.tmpl" %} |
54 {%- endfor %} | 55 {%- endfor %} |
55 | 56 |
56 {#--- Interface Stubs -#} | 57 {#--- Interface Stubs -#} |
57 {% for interface in interfaces %} | 58 {% for interface in interfaces %} |
58 {% include "interface_stub_declaration.tmpl" %} | 59 {% include "interface_stub_declaration.tmpl" %} |
59 {%- endfor %} | 60 {%- endfor %} |
60 | 61 |
| 62 {#--- Interface Request Validators -#} |
| 63 {% for interface in interfaces %} |
| 64 {% include "interface_request_validator_declaration.tmpl" %} |
| 65 {%- endfor %} |
| 66 |
| 67 {#--- Interface Response Validators -#} |
| 68 {% for interface in interfaces if interface|has_callbacks %} |
| 69 {% include "interface_response_validator_declaration.tmpl" %} |
| 70 {%- endfor %} |
| 71 |
61 {%- for namespace in namespaces_as_array|reverse %} | 72 {%- for namespace in namespaces_as_array|reverse %} |
62 } // namespace {{namespace}} | 73 } // namespace {{namespace}} |
63 {%- endfor %} | 74 {%- endfor %} |
64 | 75 |
65 {#--- Enum TypeTraits Specializations #} | 76 {#--- Enum TypeTraits Specializations #} |
66 {% if enums %} | 77 {% if enums %} |
67 namespace mojo { | 78 namespace mojo { |
68 namespace internal { | 79 namespace internal { |
69 {% for enum in enums %} | 80 {% for enum in enums %} |
70 {% include "enum_traits.tmpl" %} | 81 {% include "enum_traits.tmpl" %} |
71 {%- endfor %} | 82 {%- endfor %} |
72 } // namespace internal | 83 } // namespace internal |
73 } // namespace mojo | 84 } // namespace mojo |
74 {%- endif %} | 85 {%- endif %} |
75 | 86 |
76 #endif // {{header_guard}} | 87 #endif // {{header_guard}} |
OLD | NEW |