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

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

Issue 198343002: Mojo: request/response bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 months 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 | Annotate | Revision Log
OLDNEW
1 {%- import "interface_macros.tmpl" as interface_macros %}
1 class {{interface.name}}Proxy; 2 class {{interface.name}}Proxy;
2 class {{interface.name}}Stub; 3 class {{interface.name}}Stub;
3 {% if interface.peer %} 4 {% if interface.peer %}
4 class {{interface.peer}}; 5 class {{interface.peer}};
5 {% endif %} 6 {% endif %}
6 7
7 class {{interface.name}} { 8 class {{interface.name}} {
8 public: 9 public:
9 typedef {{interface.name}}Proxy _Proxy; 10 typedef {{interface.name}}Proxy _Proxy;
10 typedef {{interface.name}}Stub _Stub; 11 typedef {{interface.name}}Stub _Stub;
11 {% if interface.peer %} 12 {% if interface.peer %}
12 typedef {{interface.peer}} _Peer; 13 typedef {{interface.peer}} _Peer;
13 {% else %} 14 {% else %}
14 typedef mojo::NoInterface _Peer; 15 typedef mojo::NoInterface _Peer;
15 {% endif %} 16 {% endif %}
16 17
17 {#--- Enums #} 18 {#--- Enums #}
18 {%- for enum in interface.enums %} 19 {%- for enum in interface.enums %}
19 {% macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %} 20 {% macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %}
20 {{enum_def()|indent(2)}} 21 {{enum_def()|indent(2)}}
21 {%- endfor %} 22 {%- endfor %}
22 23
23 {#--- Methods #} 24 {#--- Methods #}
24 {% for method in interface.methods %} 25 {%- for method in interface.methods %}
25 virtual void {{method.name}}( 26 virtual void {{method.name}}({{interface_macros.declare_request_params(method) }}) = 0;
26 {%- for param in method.parameters -%}
27 {{param.kind|cpp_const_wrapper_type}} {{param.name}}
28 {%- if not loop.last %}, {% endif -%}
29 {%- endfor -%}
30 ) = 0;
31 {%- endfor %} 27 {%- endfor %}
32 }; 28 };
33 29
34 typedef mojo::Interface<{{interface.name}}>::Handle {{interface.name}}Handle; 30 typedef mojo::Interface<{{interface.name}}>::Handle {{interface.name}}Handle;
35 typedef mojo::Interface<{{interface.name}}>::ScopedHandle Scoped{{interface.name }}Handle; 31 typedef mojo::Interface<{{interface.name}}>::ScopedHandle Scoped{{interface.name }}Handle;
OLDNEW
« no previous file with comments | « mojo/public/bindings/callback.h.pump ('k') | mojo/public/bindings/generators/cpp_templates/interface_definition.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698