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 = "MOJO_GENERATED_BINDINGS_%s_%s_INTERNAL_H_"| | 5 {%- set header_guard = "MOJO_GENERATED_BINDINGS_%s_%s_INTERNAL_H_"| |
6 format(module_name|upper, module_name|upper) %} | 6 format(module_name|upper, module_name|upper) %} |
7 | 7 |
8 #ifndef {{header_guard}} | 8 #ifndef {{header_guard}} |
9 #define {{header_guard}} | 9 #define {{header_guard}} |
10 | 10 |
11 #include "mojo/public/bindings/lib/bindings_serialization.h" | 11 #include "mojo/public/bindings/lib/bindings_internal.h" |
12 | 12 |
13 namespace {{namespace}} { | 13 namespace {{namespace}} { |
14 | 14 |
15 {#--- Wrapper forward declarations #} | 15 {#--- Wrapper forward declarations #} |
16 {% for struct in structs %} | 16 {% for struct in structs %} |
17 class {{struct.name}}; | 17 class {{struct.name}}; |
18 {%- endfor %} | 18 {%- endfor %} |
19 | 19 |
20 namespace internal { | 20 namespace internal { |
21 | 21 |
22 #pragma pack(push, 1) | 22 #pragma pack(push, 1) |
23 | 23 |
24 {#--- Class declarations #} | 24 {#--- Class declarations #} |
25 {% for struct in structs %} | 25 {% for struct in structs %} |
26 {% include "struct_declaration.tmpl" %} | 26 {% include "struct_declaration.tmpl" %} |
27 {%- endfor %} | 27 {%- endfor %} |
28 | 28 |
29 #pragma pack(pop) | 29 #pragma pack(pop) |
30 | 30 |
31 } // namespace internal | 31 } // namespace internal |
32 } // namespace {{namespace}} | 32 } // namespace {{namespace}} |
33 | 33 |
34 namespace mojo { | |
35 namespace internal { | |
36 | |
37 {#--- Serialization traits #} | |
38 {% for struct in structs %} | |
39 {% include "struct_serialization_traits.tmpl" %} | |
40 {%- endfor %} | |
41 | |
42 } // namespace internal | |
43 } // namespace mojo | |
44 | |
45 #endif // {{header_guard}} | 34 #endif // {{header_guard}} |
OLD | NEW |