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_H_"| | 5 {%- set header_guard = "%s_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 <stdint.h> | 11 #include <stdint.h> |
12 | 12 |
13 #include "mojo/public/cpp/bindings/array.h" | 13 #include "mojo/public/cpp/bindings/array.h" |
| 14 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" |
14 #include "mojo/public/cpp/bindings/associated_interface_ptr_info.h" | 15 #include "mojo/public/cpp/bindings/associated_interface_ptr_info.h" |
15 #include "mojo/public/cpp/bindings/associated_interface_request.h" | 16 #include "mojo/public/cpp/bindings/associated_interface_request.h" |
16 #include "mojo/public/cpp/bindings/callback.h" | 17 #include "mojo/public/cpp/bindings/callback.h" |
17 #include "mojo/public/cpp/bindings/interface_ptr.h" | 18 #include "mojo/public/cpp/bindings/interface_ptr.h" |
18 #include "mojo/public/cpp/bindings/interface_request.h" | 19 #include "mojo/public/cpp/bindings/interface_request.h" |
19 #include "mojo/public/cpp/bindings/lib/control_message_handler.h" | 20 #include "mojo/public/cpp/bindings/lib/control_message_handler.h" |
20 #include "mojo/public/cpp/bindings/lib/control_message_proxy.h" | 21 #include "mojo/public/cpp/bindings/lib/control_message_proxy.h" |
21 #include "mojo/public/cpp/bindings/map.h" | 22 #include "mojo/public/cpp/bindings/map.h" |
22 #include "mojo/public/cpp/bindings/message_filter.h" | 23 #include "mojo/public/cpp/bindings/message_filter.h" |
23 #include "mojo/public/cpp/bindings/no_interface.h" | 24 #include "mojo/public/cpp/bindings/no_interface.h" |
(...skipping 22 matching lines...) Expand all Loading... |
46 const {{constant.kind|cpp_pod_type}} {{constant.name}} = {{constant|constant_val
ue}}; | 47 const {{constant.kind|cpp_pod_type}} {{constant.name}} = {{constant|constant_val
ue}}; |
47 {%- else %} | 48 {%- else %} |
48 extern const {{constant.kind|cpp_pod_type}} {{constant.name}}; | 49 extern const {{constant.kind|cpp_pod_type}} {{constant.name}}; |
49 {%- endif %} | 50 {%- endif %} |
50 {%- endfor %} | 51 {%- endfor %} |
51 | 52 |
52 {#--- Interface Forward Declarations -#} | 53 {#--- Interface Forward Declarations -#} |
53 {% for interface in interfaces %} | 54 {% for interface in interfaces %} |
54 class {{interface.name}}; | 55 class {{interface.name}}; |
55 using {{interface.name}}Ptr = mojo::InterfacePtr<{{interface.name}}>; | 56 using {{interface.name}}Ptr = mojo::InterfacePtr<{{interface.name}}>; |
| 57 using {{interface.name}}AssociatedPtr = mojo::AssociatedInterfacePtr<{{interface
.name}}>; |
56 {% endfor %} | 58 {% endfor %} |
57 | 59 |
58 {#--- Struct Forward Declarations -#} | 60 {#--- Struct Forward Declarations -#} |
59 {% for struct in structs %} | 61 {% for struct in structs %} |
60 class {{struct.name}}; | 62 class {{struct.name}}; |
61 {% if struct|should_inline %} | 63 {% if struct|should_inline %} |
62 using {{struct.name}}Ptr = mojo::InlinedStructPtr<{{struct.name}}>; | 64 using {{struct.name}}Ptr = mojo::InlinedStructPtr<{{struct.name}}>; |
63 {% else %} | 65 {% else %} |
64 using {{struct.name}}Ptr = mojo::StructPtr<{{struct.name}}>; | 66 using {{struct.name}}Ptr = mojo::StructPtr<{{struct.name}}>; |
65 {% endif %} | 67 {% endif %} |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 {% for union in unions %} | 137 {% for union in unions %} |
136 {% include "union_serialization_declaration.tmpl" %} | 138 {% include "union_serialization_declaration.tmpl" %} |
137 {%- endfor %} | 139 {%- endfor %} |
138 {%- endif %} | 140 {%- endif %} |
139 | 141 |
140 {%- for namespace in namespaces_as_array|reverse %} | 142 {%- for namespace in namespaces_as_array|reverse %} |
141 } // namespace {{namespace}} | 143 } // namespace {{namespace}} |
142 {%- endfor %} | 144 {%- endfor %} |
143 | 145 |
144 #endif // {{header_guard}} | 146 #endif // {{header_guard}} |
OLD | NEW |