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 {%- if variant -%} | 5 {%- if variant -%} |
6 {%- set variant_path = "%s-%s"|format(module.path, variant) -%} | 6 {%- set variant_path = "%s-%s"|format(module.path, variant) -%} |
7 {%- else -%} | 7 {%- else -%} |
8 {%- set variant_path = module.path -%} | 8 {%- set variant_path = module.path -%} |
9 {%- endif -%} | 9 {%- endif -%} |
10 | 10 |
11 {%- set header_guard = "%s_INTERNAL_H_"|format( | 11 {%- set header_guard = "%s_INTERNAL_H_"|format( |
12 variant_path|upper|replace("/","_")|replace(".","_")| | 12 variant_path|upper|replace("/","_")|replace(".","_")| |
13 replace("-", "_")) %} | 13 replace("-", "_")) %} |
14 | 14 |
15 #ifndef {{header_guard}} | 15 #ifndef {{header_guard}} |
16 #define {{header_guard}} | 16 #define {{header_guard}} |
17 | 17 |
18 #include "mojo/public/cpp/bindings/lib/bindings_internal.h" | 18 #include "mojo/public/cpp/bindings/lib/bindings_internal.h" |
19 #include "mojo/public/cpp/bindings/lib/buffer.h" | 19 #include "mojo/public/cpp/bindings/lib/buffer.h" |
20 #include "mojo/public/cpp/bindings/lib/serialization.h" | 20 #include "mojo/public/cpp/bindings/lib/serialization.h" |
21 #include "mojo/public/cpp/bindings/lib/union_accessor.h" | 21 #include "mojo/public/cpp/bindings/lib/union_accessor.h" |
22 #include "mojo/public/cpp/bindings/lib/value_traits.h" | 22 #include "mojo/public/cpp/bindings/lib/value_traits.h" |
23 #include "mojo/public/cpp/bindings/struct_ptr.h" | 23 #include "mojo/public/cpp/bindings/struct_ptr.h" |
24 {%- for header in extra_headers %} | |
25 #include "{{header}}" | |
26 {%- endfor %} | |
27 | 24 |
28 {%- for import in imports %} | 25 {%- for import in imports %} |
29 {%- if variant %} | 26 {%- if variant %} |
30 #include "{{"%s-%s-internal.h"|format(import.module.path, variant)}}" | 27 #include "{{"%s-%s-internal.h"|format(import.module.path, variant)}}" |
31 {%- else %} | 28 {%- else %} |
32 #include "{{import.module.path}}-internal.h" | 29 #include "{{import.module.path}}-internal.h" |
33 {%- endif %} | 30 {%- endif %} |
34 {%- endfor %} | 31 {%- endfor %} |
35 | 32 |
36 namespace mojo { | 33 namespace mojo { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 100 |
104 } // namespace internal | 101 } // namespace internal |
105 {%- if variant %} | 102 {%- if variant %} |
106 } // namespace {{variant}} | 103 } // namespace {{variant}} |
107 {%- endif %} | 104 {%- endif %} |
108 {%- for namespace in namespaces_as_array|reverse %} | 105 {%- for namespace in namespaces_as_array|reverse %} |
109 } // namespace {{namespace}} | 106 } // namespace {{namespace}} |
110 {%- endfor %} | 107 {%- endfor %} |
111 | 108 |
112 #endif // {{header_guard}} | 109 #endif // {{header_guard}} |
OLD | NEW |