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 #if defined(__clang__) | 5 #if defined(__clang__) |
6 #pragma clang diagnostic push | 6 #pragma clang diagnostic push |
7 #pragma clang diagnostic ignored "-Wunused-private-field" | 7 #pragma clang diagnostic ignored "-Wunused-private-field" |
8 #endif | 8 #endif |
9 | 9 |
10 #include "{{module.path}}.h" | 10 #include "{{module.path}}.h" |
11 | 11 |
12 #include "mojo/public/cpp/bindings/lib/bindings_serialization.h" | 12 #include "mojo/public/cpp/bindings/lib/bindings_serialization.h" |
13 #include "mojo/public/cpp/bindings/lib/message_builder.h" | 13 #include "mojo/public/cpp/bindings/lib/message_builder.h" |
14 | 14 |
| 15 {%- if namespace %} |
15 namespace {{namespace}} { | 16 namespace {{namespace}} { |
| 17 {%- endif %} |
16 namespace internal { | 18 namespace internal { |
17 namespace { | 19 namespace { |
18 | 20 |
19 #pragma pack(push, 1) | 21 #pragma pack(push, 1) |
20 | 22 |
21 {#--- Interface parameter definitions #} | 23 {#--- Interface parameter definitions #} |
22 {%- for interface in interfaces %} | 24 {%- for interface in interfaces %} |
23 {%- for method in interface.methods %} | 25 {%- for method in interface.methods %} |
24 {%- set method_name = "k%s_%s_Name"|format(interface.name, method.name) %} | 26 {%- set method_name = "k%s_%s_Name"|format(interface.name, method.name) %} |
25 const uint32_t {{method_name}} = {{method.ordinal}}; | 27 const uint32_t {{method_name}} = {{method.ordinal}}; |
(...skipping 24 matching lines...) Expand all Loading... |
50 | 52 |
51 {#--- Struct builder definitions #} | 53 {#--- Struct builder definitions #} |
52 {%- for struct in structs %} | 54 {%- for struct in structs %} |
53 {%- include "struct_builder_definition.tmpl" %} | 55 {%- include "struct_builder_definition.tmpl" %} |
54 {%- endfor %} | 56 {%- endfor %} |
55 | 57 |
56 {#--- Interface definitions #} | 58 {#--- Interface definitions #} |
57 {%- for interface in interfaces %} | 59 {%- for interface in interfaces %} |
58 {%- include "interface_definition.tmpl" %} | 60 {%- include "interface_definition.tmpl" %} |
59 {%- endfor %} | 61 {%- endfor %} |
| 62 {%- if namespace %} |
60 } // namespace {{namespace}} | 63 } // namespace {{namespace}} |
| 64 {%- endif %} |
61 | 65 |
62 #if defined(__clang__) | 66 #if defined(__clang__) |
63 #pragma clang diagnostic pop | 67 #pragma clang diagnostic pop |
64 #endif | 68 #endif |
OLD | NEW |