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

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

Issue 1524693002: [mojo] Add GenericInterface_ to interface class variants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bindings-2-typemaps
Patch Set: merge Created 5 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
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 class {{interface.name}}Stub; 3 class {{interface.name}}Stub;
4 4
5 class {{interface.name}}RequestValidator; 5 class {{interface.name}}RequestValidator;
6 {%- if interface|has_callbacks %} 6 {%- if interface|has_callbacks %}
7 class {{interface.name}}ResponseValidator; 7 class {{interface.name}}ResponseValidator;
8 {%- endif %} 8 {%- endif %}
9 9
10 class {{interface.name}} { 10 class {{interface.name}} {
11 public: 11 public:
12 static const char Name_[]; 12 static const char Name_[];
13 static const uint32_t Version_ = {{interface.version}}; 13 static const uint32_t Version_ = {{interface.version}};
14 static const bool PassesAssociatedKinds_ = {% if interface|passes_associated_k inds %}true{% else %}false{% endif %}; 14 static const bool PassesAssociatedKinds_ = {% if interface|passes_associated_k inds %}true{% else %}false{% endif %};
15 15
16 using GenericInterface = {{interface|get_qualified_name_for_kind}};
17
16 using Proxy_ = {{interface.name}}Proxy; 18 using Proxy_ = {{interface.name}}Proxy;
17 using Stub_ = {{interface.name}}Stub; 19 using Stub_ = {{interface.name}}Stub;
18 20
19 using RequestValidator_ = {{interface.name}}RequestValidator; 21 using RequestValidator_ = {{interface.name}}RequestValidator;
20 {%- if interface|has_callbacks %} 22 {%- if interface|has_callbacks %}
21 using ResponseValidator_ = {{interface.name}}ResponseValidator; 23 using ResponseValidator_ = {{interface.name}}ResponseValidator;
22 {%- else %} 24 {%- else %}
23 using ResponseValidator_ = mojo::PassThroughFilter; 25 using ResponseValidator_ = mojo::PassThroughFilter;
24 {%- endif %} 26 {%- endif %}
25 27
(...skipping 15 matching lines...) Expand all
41 {#--- Methods #} 43 {#--- Methods #}
42 virtual ~{{interface.name}}() {} 44 virtual ~{{interface.name}}() {}
43 45
44 {%- for method in interface.methods %} 46 {%- for method in interface.methods %}
45 {% if method.response_parameters != None %} 47 {% if method.response_parameters != None %}
46 using {{method.name}}Callback = {{interface_macros.declare_callback(method)}}; 48 using {{method.name}}Callback = {{interface_macros.declare_callback(method)}};
47 {%- endif %} 49 {%- endif %}
48 virtual void {{method.name}}({{interface_macros.declare_request_params("", met hod)}}) = 0; 50 virtual void {{method.name}}({{interface_macros.declare_request_params("", met hod)}}) = 0;
49 {%- endfor %} 51 {%- endfor %}
50 }; 52 };
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/interface_ptr_state.h ('k') | mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698