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