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

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

Issue 289063015: Mojo: Remove SetClient from generated interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 {%- 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 {% if interface.client %} 9 {% if interface.client %}
10 class {{interface.client}}; 10 class {{interface.client}};
(...skipping 23 matching lines...) Expand all
34 34
35 {#--- Enums #} 35 {#--- Enums #}
36 {%- for enum in interface.enums %} 36 {%- for enum in interface.enums %}
37 {% macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %} 37 {% macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %}
38 {{enum_def()|indent(2)}} 38 {{enum_def()|indent(2)}}
39 {%- endfor %} 39 {%- endfor %}
40 40
41 {#--- Methods #} 41 {#--- Methods #}
42 virtual ~{{interface.name}}() {} 42 virtual ~{{interface.name}}() {}
43 43
44 {%- if interface.client %}
45 // Called once before any other method.
46 virtual void SetClient({{interface.client}}* client) = 0;
47 {%- else %}
48 virtual void SetClient(mojo::NoInterface* client) {}
49 {%- endif %}
50 {%- for method in interface.methods %} 44 {%- for method in interface.methods %}
51 virtual void {{method.name}}({{interface_macros.declare_request_params("", met hod)}}) = 0; 45 virtual void {{method.name}}({{interface_macros.declare_request_params("", met hod)}}) = 0;
52 {%- endfor %} 46 {%- endfor %}
53 }; 47 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698