| 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_INTERNAL_H_"| | 5 {%- set header_guard = "%s_INTERNAL_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/lib/bindings_internal.h" | 11 #include "mojo/public/cpp/bindings/lib/bindings_internal.h" |
| 12 {%- for import in imports %} | 12 {%- for import in imports %} |
| 13 #include "{{import.module.path}}-internal.h" | 13 #include "{{import.module.path}}-internal.h" |
| 14 {%- endfor %} | 14 {%- endfor %} |
| 15 | 15 |
| 16 {%- if namespace %} |
| 16 namespace {{namespace}} { | 17 namespace {{namespace}} { |
| 18 {%- endif %} |
| 17 | 19 |
| 18 {#--- Wrapper forward declarations #} | 20 {#--- Wrapper forward declarations #} |
| 19 {% for struct in structs %} | 21 {% for struct in structs %} |
| 20 class {{struct.name}}; | 22 class {{struct.name}}; |
| 21 {%- endfor %} | 23 {%- endfor %} |
| 22 | 24 |
| 23 namespace internal { | 25 namespace internal { |
| 24 | 26 |
| 25 #pragma pack(push, 1) | 27 #pragma pack(push, 1) |
| 26 | 28 |
| 27 {#--- Class declarations #} | 29 {#--- Class declarations #} |
| 28 {% for struct in structs %} | 30 {% for struct in structs %} |
| 29 {% include "struct_declaration.tmpl" %} | 31 {% include "struct_declaration.tmpl" %} |
| 30 {%- endfor %} | 32 {%- endfor %} |
| 31 | 33 |
| 32 #pragma pack(pop) | 34 #pragma pack(pop) |
| 33 | 35 |
| 34 } // namespace internal | 36 } // namespace internal |
| 37 {%- if namespace %} |
| 35 } // namespace {{namespace}} | 38 } // namespace {{namespace}} |
| 39 {%- endif %} |
| 36 | 40 |
| 37 #endif // {{header_guard}} | 41 #endif // {{header_guard}} |
| OLD | NEW |