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

Unified Diff: mojo/public/bindings/generators/cpp_templates/struct_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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/bindings/generators/cpp_templates/struct_declaration.tmpl
diff --git a/mojo/public/bindings/generators/cpp_templates/struct_declaration.tmpl b/mojo/public/bindings/generators/cpp_templates/struct_declaration.tmpl
index 8614ee145395008dd68213164655260ea785c893..480e4726e6a32b3ea6a538329612332076d9c5b3 100644
--- a/mojo/public/bindings/generators/cpp_templates/struct_declaration.tmpl
+++ b/mojo/public/bindings/generators/cpp_templates/struct_declaration.tmpl
@@ -4,6 +4,12 @@ class {{class_name}} {
public:
typedef {{struct.name}} Wrapper;
+{#--- Enums #}
+{%- for enum in struct.enums %}
+{% macro enum_def() %}{% include "enum_declaration.tmpl" %}{% endmacro %}
+ {{enum_def()|indent(2)}}
+{%- endfor %}
+
static {{class_name}}* New(mojo::Buffer* buf, mojo::Buffer::Destructor dtor = NULL);
{#--- Setters -#}

Powered by Google App Engine
This is Rietveld 408576698