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

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

Issue 2594203002: [mojo] Expose interface method min_versions (Closed)
Patch Set: Removed a k in the enum name Created 4 years 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {%- import "interface_macros.tmpl" as interface_macros %} 1 {%- import "interface_macros.tmpl" as interface_macros %}
2 class {{interface.name}}Proxy; 2 class {{interface.name}}Proxy;
3 3
4 template <typename ImplRefTraits> 4 template <typename ImplRefTraits>
5 class {{interface.name}}Stub; 5 class {{interface.name}}Stub;
6 6
7 class {{interface.name}}RequestValidator; 7 class {{interface.name}}RequestValidator;
8 {%- if interface|has_callbacks %} 8 {%- if interface|has_callbacks %}
9 class {{interface.name}}ResponseValidator; 9 class {{interface.name}}ResponseValidator;
10 {%- endif %} 10 {%- endif %}
(...skipping 11 matching lines...) Expand all
22 template <typename ImplRefTraits> 22 template <typename ImplRefTraits>
23 using Stub_ = {{interface.name}}Stub<ImplRefTraits>; 23 using Stub_ = {{interface.name}}Stub<ImplRefTraits>;
24 24
25 using RequestValidator_ = {{interface.name}}RequestValidator; 25 using RequestValidator_ = {{interface.name}}RequestValidator;
26 {%- if interface|has_callbacks %} 26 {%- if interface|has_callbacks %}
27 using ResponseValidator_ = {{interface.name}}ResponseValidator; 27 using ResponseValidator_ = {{interface.name}}ResponseValidator;
28 {%- else %} 28 {%- else %}
29 using ResponseValidator_ = mojo::PassThroughFilter; 29 using ResponseValidator_ = mojo::PassThroughFilter;
30 {%- endif %} 30 {%- endif %}
31 31
32 {#--- Metadata #}
33 enum MethodMinVersions : uint32_t {
34 {%- for method in interface.methods %}
35 k{{method.name}}MinVersion = {{method.min_version|default(0, true)}},
36 {%- endfor %}
37 };
38
32 {#--- Enums #} 39 {#--- Enums #}
33 {%- for enum in interface.enums %} 40 {%- for enum in interface.enums %}
34 using {{enum.name}} = {{enum|get_name_for_kind(flatten_nested_kind=True)}}; 41 using {{enum.name}} = {{enum|get_name_for_kind(flatten_nested_kind=True)}};
35 {%- endfor %} 42 {%- endfor %}
36 43
37 {#--- Constants #} 44 {#--- Constants #}
38 {%- for constant in interface.constants %} 45 {%- for constant in interface.constants %}
39 {%- if constant.kind|is_integral_kind %} 46 {%- if constant.kind|is_integral_kind %}
40 static const {{constant.kind|cpp_pod_type}} {{constant.name}} = {{constant|con stant_value}}; 47 static const {{constant.kind|cpp_pod_type}} {{constant.name}} = {{constant|con stant_value}};
41 {%- else %} 48 {%- else %}
(...skipping 11 matching lines...) Expand all
53 // should implement the signature with callback below. 60 // should implement the signature with callback below.
54 virtual bool {{method.name}}({{interface_macros.declare_sync_method_params("", method)}}); 61 virtual bool {{method.name}}({{interface_macros.declare_sync_method_params("", method)}});
55 {%- endif %} 62 {%- endif %}
56 63
57 using {{method.name}}Callback = {{interface_macros.declare_callback(method, 64 using {{method.name}}Callback = {{interface_macros.declare_callback(method,
58 for_blink, use_once_callback)}}; 65 for_blink, use_once_callback)}};
59 {%- endif %} 66 {%- endif %}
60 virtual void {{method.name}}({{interface_macros.declare_request_params("", met hod, use_once_callback)}}) = 0; 67 virtual void {{method.name}}({{interface_macros.declare_request_params("", met hod, use_once_callback)}}) = 0;
61 {%- endfor %} 68 {%- endfor %}
62 }; 69 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698