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

Unified Diff: mojo/public/bindings/generators/cpp_templates/enum_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: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/bindings/generators/cpp_templates/enum_declaration.tmpl
diff --git a/mojo/public/bindings/generators/cpp_templates/enum_declaration.tmpl b/mojo/public/bindings/generators/cpp_templates/enum_declaration.tmpl
new file mode 100644
index 0000000000000000000000000000000000000000..08c12c59e61e26496fff55a03592b9ea23b7eae9
--- /dev/null
+++ b/mojo/public/bindings/generators/cpp_templates/enum_declaration.tmpl
@@ -0,0 +1,9 @@
+enum {{enum.name}} {
+{%- for field in enum.fields %}
+{%- if field.value %}
+ {{field.name}} = {{field.value}},
+{%- else %}
+ {{field.name}},
+{%- endif %}
+{%- endfor %}
+};

Powered by Google App Engine
This is Rietveld 408576698