| 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 namespace mojo { |
| 17 namespace internal { |
| 18 class BoundsChecker; |
| 19 } |
| 20 } |
| 21 |
| 16 {%- for namespace in namespaces_as_array %} | 22 {%- for namespace in namespaces_as_array %} |
| 17 namespace {{namespace}} { | 23 namespace {{namespace}} { |
| 18 {%- endfor %} | 24 {%- endfor %} |
| 19 | 25 |
| 20 {#--- Wrapper forward declarations #} | 26 {#--- Wrapper forward declarations #} |
| 21 {% for struct in structs %} | 27 {% for struct in structs %} |
| 22 class {{struct.name}}; | 28 class {{struct.name}}; |
| 23 {%- endfor %} | 29 {%- endfor %} |
| 24 | 30 |
| 25 namespace internal { | 31 namespace internal { |
| 26 | 32 |
| 27 #pragma pack(push, 1) | 33 #pragma pack(push, 1) |
| 28 | 34 |
| 29 {#--- Class declarations #} | 35 {#--- Class declarations #} |
| 30 {% for struct in structs %} | 36 {% for struct in structs %} |
| 31 {% include "struct_declaration.tmpl" %} | 37 {% include "struct_declaration.tmpl" %} |
| 32 {%- endfor %} | 38 {%- endfor %} |
| 33 | 39 |
| 34 #pragma pack(pop) | 40 #pragma pack(pop) |
| 35 | 41 |
| 36 } // namespace internal | 42 } // namespace internal |
| 37 {%- for namespace in namespaces_as_array|reverse %} | 43 {%- for namespace in namespaces_as_array|reverse %} |
| 38 } // namespace {{namespace}} | 44 } // namespace {{namespace}} |
| 39 {%- endfor %} | 45 {%- endfor %} |
| 40 | 46 |
| 41 #endif // {{header_guard}} | 47 #endif // {{header_guard}} |
| OLD | NEW |