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

Unified Diff: mojo/public/bindings/generators/cpp_templates/wrapper_class_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/wrapper_class_declaration.tmpl
diff --git a/mojo/public/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl b/mojo/public/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
index ca339794ce6d3140c091c91317ff34f181f848ed..46bdcd3cae12c874741b8ca0385d763db7f4c976 100644
--- a/mojo/public/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
+++ b/mojo/public/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl
@@ -1,6 +1,9 @@
class {{struct.name}} {
public:
typedef internal::{{struct.name}}_Data Data;
+{%- for enum in struct.enums %}
+ typedef internal::{{enum.name}} {{enum.name}};
+{%- endfor %}
{{struct.name}}() : data_(NULL) {
}

Powered by Google App Engine
This is Rietveld 408576698