Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: mojo/public/tools/bindings/generators/cpp_templates/module-shared-internal.h.tmpl

Issue 2794743002: Add a mechanism to scramble Mojo message IDs. (Closed)
Patch Set: Add a mechanism to scramble Mojo message IDs. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | mojo/public/tools/bindings/mojom_bindings_generator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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}}
OLDNEW
« no previous file with comments | « no previous file | mojo/public/tools/bindings/mojom_bindings_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698