OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SHARED_INTERNAL_H_"|format( | 5 {%- set header_guard = "%s_SHARED_INTERNAL_H_"|format( |
6 module.path|upper|replace("/","_")|replace(".","_")| | 6 module.path|upper|replace("/","_")|replace(".","_")| |
7 replace("-", "_")) %} | 7 replace("-", "_")) %} |
8 | 8 |
9 #ifndef {{header_guard}} | 9 #ifndef {{header_guard}} |
10 #define {{header_guard}} | 10 #define {{header_guard}} |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 {#--- Struct class declarations #} | 68 {#--- Struct class declarations #} |
69 {%- for struct in structs %} | 69 {%- for struct in structs %} |
70 {%- if not struct|is_native_only_kind %} | 70 {%- if not struct|is_native_only_kind %} |
71 {% include "struct_declaration.tmpl" %} | 71 {% include "struct_declaration.tmpl" %} |
72 {%- endif %} | 72 {%- endif %} |
73 {%- endfor %} | 73 {%- endfor %} |
74 | 74 |
75 {#--- Interface parameter definitions #} | 75 {#--- Interface parameter definitions #} |
76 {%- for interface in interfaces %} | 76 {%- for interface in interfaces %} |
77 {%- for method in interface.methods %} | 77 {%- for method in interface.methods %} |
| 78 {%- if method.ordinal_comment %} |
| 79 // {{method.ordinal_comment}} |
| 80 {%- endif %} |
78 {%- set method_name = "k%s_%s_Name"|format(interface.name, method.name) %} | 81 {%- set method_name = "k%s_%s_Name"|format(interface.name, method.name) %} |
79 constexpr uint32_t {{method_name}} = {{method.ordinal}}; | 82 constexpr uint32_t {{method_name}} = {{method.ordinal}}; |
80 {%- set struct = method.param_struct %} | 83 {%- set struct = method.param_struct %} |
81 {% include "struct_declaration.tmpl" %} | 84 {% include "struct_declaration.tmpl" %} |
82 {%- if method.response_parameters != None %} | 85 {%- if method.response_parameters != None %} |
83 {%- set struct = method.response_param_struct %} | 86 {%- set struct = method.response_param_struct %} |
84 {% include "struct_declaration.tmpl" %} | 87 {% include "struct_declaration.tmpl" %} |
85 {%- endif %} | 88 {%- endif %} |
86 {%- endfor %} | 89 {%- endfor %} |
87 {%- endfor %} | 90 {%- endfor %} |
88 | 91 |
89 #pragma pack(pop) | 92 #pragma pack(pop) |
90 | 93 |
91 } // namespace internal | 94 } // namespace internal |
92 {%- for namespace in namespaces_as_array|reverse %} | 95 {%- for namespace in namespaces_as_array|reverse %} |
93 } // namespace {{namespace}} | 96 } // namespace {{namespace}} |
94 {%- endfor %} | 97 {%- endfor %} |
95 | 98 |
96 #endif // {{header_guard}} | 99 #endif // {{header_guard}} |
OLD | NEW |