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

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

Issue 99623010: Add support for enums within structs and interfaces to mojom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 11 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 class {{interface.name}}Proxy; 1 class {{interface.name}}Proxy;
2 class {{interface.name}}Stub; 2 class {{interface.name}}Stub;
3 class {{interface.peer}}; 3 class {{interface.peer}};
4 4
5 class {{interface.name}} { 5 class {{interface.name}} {
6 public: 6 public:
7 typedef {{interface.name}}Proxy _Proxy; 7 typedef {{interface.name}}Proxy _Proxy;
8 typedef {{interface.name}}Stub _Stub; 8 typedef {{interface.name}}Stub _Stub;
9 typedef {{interface.peer}} _Peer; 9 typedef {{interface.peer}} _Peer;
10 10
11 {%- for method in interface.methods %} 11 {#--- Enums #}
12 {%- for enum in interface.enums %}
13 {% macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %}
14 {{enum_def()|indent(2)}}
15 {%- endfor %}
16
17 {#--- Methods #}
18 {% for method in interface.methods %}
12 virtual void {{method.name}}( 19 virtual void {{method.name}}(
13 {%- for param in method.parameters -%} 20 {%- for param in method.parameters -%}
14 {{param.kind|cpp_const_wrapper_type}} {{param.name}} 21 {{param.kind|cpp_const_wrapper_type}} {{param.name}}
15 {%- if not loop.last %}, {% endif -%} 22 {%- if not loop.last %}, {% endif -%}
16 {%- endfor -%} 23 {%- endfor -%}
17 ) = 0; 24 ) = 0;
18 {%- endfor %} 25 {%- endfor %}
19 }; 26 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698