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

Unified Diff: mojo/public/bindings/generators/cpp_templates/module.h.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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/bindings/generators/cpp_templates/module.h.tmpl
diff --git a/mojo/public/bindings/generators/cpp_templates/module.h.tmpl b/mojo/public/bindings/generators/cpp_templates/module.h.tmpl
index b851ec8ff41deeebdb70e04ee54762f351746989..bc5ff63086addf2da709174a5363ccddae11e980 100644
--- a/mojo/public/bindings/generators/cpp_templates/module.h.tmpl
+++ b/mojo/public/bindings/generators/cpp_templates/module.h.tmpl
@@ -15,37 +15,28 @@
namespace {{namespace}} {
{#--- Enums #}
-{%- for enum in enums %}
-
-enum {{enum.name}} {
-{%- for field in enum.fields %}
-{%- if field.value %}
- {{field.name}} = {{field.value}},
-{%- else %}
- {{field.name}},
-{%- endif %}
-{%- endfor %}
-};
+{% for enum in enums %}
+{% include "enum_declaration.tmpl" %}
{%- endfor %}
{#--- Structs #}
{% for struct in structs %}
-{% include "wrapper_class_declaration.tmpl" -%}
+{% include "wrapper_class_declaration.tmpl" %}
{%- endfor %}
{#--- Interfaces -#}
{% for interface in interfaces %}
-{% include "interface_declaration.tmpl" -%}
+{% include "interface_declaration.tmpl" %}
{%- endfor %}
{#--- Interface Proxies -#}
{% for interface in interfaces %}
-{% include "interface_proxy_declaration.tmpl" -%}
+{% include "interface_proxy_declaration.tmpl" %}
{%- endfor %}
{#--- Interface Stubs -#}
{% for interface in interfaces %}
-{% include "interface_stub_declaration.tmpl" -%}
+{% include "interface_stub_declaration.tmpl" %}
{%- endfor %}
} // namespace {{namespace}}

Powered by Google App Engine
This is Rietveld 408576698