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

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

Issue 2506383002: Mojo: adding a thread safe associated interface ptr. (Closed)
Patch Set: Fixed BUILD.gn Created 4 years, 1 month 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
OLDNEW
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 variant -%} 5 {%- if variant -%}
6 {%- set variant_path = "%s-%s"|format(module.path, variant) -%} 6 {%- set variant_path = "%s-%s"|format(module.path, variant) -%}
7 {%- else -%} 7 {%- else -%}
8 {%- set variant_path = module.path -%} 8 {%- set variant_path = module.path -%}
9 {%- endif -%} 9 {%- endif -%}
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "mojo/public/cpp/bindings/lib/control_message_handler.h" 48 #include "mojo/public/cpp/bindings/lib/control_message_handler.h"
49 #include "mojo/public/cpp/bindings/lib/control_message_proxy.h" 49 #include "mojo/public/cpp/bindings/lib/control_message_proxy.h"
50 #include "mojo/public/cpp/bindings/lib/serialization.h" 50 #include "mojo/public/cpp/bindings/lib/serialization.h"
51 #include "mojo/public/cpp/bindings/lib/union_accessor.h" 51 #include "mojo/public/cpp/bindings/lib/union_accessor.h"
52 #include "mojo/public/cpp/bindings/map.h" 52 #include "mojo/public/cpp/bindings/map.h"
53 #include "mojo/public/cpp/bindings/native_struct.h" 53 #include "mojo/public/cpp/bindings/native_struct.h"
54 #include "mojo/public/cpp/bindings/no_interface.h" 54 #include "mojo/public/cpp/bindings/no_interface.h"
55 #include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h" 55 #include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h"
56 #include "mojo/public/cpp/bindings/struct_ptr.h" 56 #include "mojo/public/cpp/bindings/struct_ptr.h"
57 #include "mojo/public/cpp/bindings/struct_traits.h" 57 #include "mojo/public/cpp/bindings/struct_traits.h"
58 #include "mojo/public/cpp/bindings/thread_safe_associated_interface_ptr.h"
58 #include "mojo/public/cpp/bindings/thread_safe_interface_ptr.h" 59 #include "mojo/public/cpp/bindings/thread_safe_interface_ptr.h"
59 #include "mojo/public/cpp/bindings/union_traits.h" 60 #include "mojo/public/cpp/bindings/union_traits.h"
60 #include "{{module.path}}-shared.h" 61 #include "{{module.path}}-shared.h"
61 {%- for import in imports %} 62 {%- for import in imports %}
62 {%- if variant %} 63 {%- if variant %}
63 #include "{{"%s-%s.h"|format(import.module.path, variant)}}" 64 #include "{{"%s-%s.h"|format(import.module.path, variant)}}"
64 {%- else %} 65 {%- else %}
65 #include "{{import.module.path}}.h" 66 #include "{{import.module.path}}.h"
66 {%- endif %} 67 {%- endif %}
67 {%- endfor %} 68 {%- endfor %}
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 {#--- Interface Forward Declarations -#} 111 {#--- Interface Forward Declarations -#}
111 {% for interface in interfaces %} 112 {% for interface in interfaces %}
112 class {{interface.name}}; 113 class {{interface.name}};
113 using {{interface.name}}Ptr = mojo::InterfacePtr<{{interface.name}}>; 114 using {{interface.name}}Ptr = mojo::InterfacePtr<{{interface.name}}>;
114 using {{interface.name}}PtrInfo = mojo::InterfacePtrInfo<{{interface.name}}>; 115 using {{interface.name}}PtrInfo = mojo::InterfacePtrInfo<{{interface.name}}>;
115 using ThreadSafe{{interface.name}}Ptr = 116 using ThreadSafe{{interface.name}}Ptr =
116 mojo::ThreadSafeInterfacePtr<{{interface.name}}>; 117 mojo::ThreadSafeInterfacePtr<{{interface.name}}>;
117 using {{interface.name}}Request = mojo::InterfaceRequest<{{interface.name}}>; 118 using {{interface.name}}Request = mojo::InterfaceRequest<{{interface.name}}>;
118 using {{interface.name}}AssociatedPtr = 119 using {{interface.name}}AssociatedPtr =
119 mojo::AssociatedInterfacePtr<{{interface.name}}>; 120 mojo::AssociatedInterfacePtr<{{interface.name}}>;
121 using ThreadSafe{{interface.name}}AssociatedPtr =
122 mojo::ThreadSafeAssociatedInterfacePtr<{{interface.name}}>;
120 using {{interface.name}}AssociatedPtrInfo = 123 using {{interface.name}}AssociatedPtrInfo =
121 mojo::AssociatedInterfacePtrInfo<{{interface.name}}>; 124 mojo::AssociatedInterfacePtrInfo<{{interface.name}}>;
122 using {{interface.name}}AssociatedRequest = 125 using {{interface.name}}AssociatedRequest =
123 mojo::AssociatedInterfaceRequest<{{interface.name}}>; 126 mojo::AssociatedInterfaceRequest<{{interface.name}}>;
124 {% endfor %} 127 {% endfor %}
125 128
126 {#--- Struct Forward Declarations -#} 129 {#--- Struct Forward Declarations -#}
127 {% for struct in structs %} 130 {% for struct in structs %}
128 {%- if struct|is_native_only_kind %} 131 {%- if struct|is_native_only_kind %}
129 using {{struct.name}} = mojo::NativeStruct; 132 using {{struct.name}} = mojo::NativeStruct;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 {#--- Union Serialization Helpers -#} 224 {#--- Union Serialization Helpers -#}
222 {% if unions %} 225 {% if unions %}
223 {%- for union in unions %} 226 {%- for union in unions %}
224 {% include "union_traits_declaration.tmpl" %} 227 {% include "union_traits_declaration.tmpl" %}
225 {%- endfor %} 228 {%- endfor %}
226 {%- endif %} 229 {%- endif %}
227 230
228 } // namespace mojo 231 } // namespace mojo
229 232
230 #endif // {{header_guard}} 233 #endif // {{header_guard}}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698