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

Unified Diff: mojo/public/bindings/generators/js_templates/interface_definition.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/js_templates/interface_definition.tmpl
diff --git a/mojo/public/bindings/generators/js_templates/interface_definition.tmpl b/mojo/public/bindings/generators/js_templates/interface_definition.tmpl
index fd8ea47c5b05310270c893c0a3f5c7f9ba38b867..fd5e27a43c384576cd8f6b95e00dd2cbf7164b41 100644
--- a/mojo/public/bindings/generators/js_templates/interface_definition.tmpl
+++ b/mojo/public/bindings/generators/js_templates/interface_definition.tmpl
@@ -44,3 +44,10 @@ params.{{parameter.name}}{% if not loop.last %}, {% endif %}
return false;
}
};
+
+{#--- Enums #}
+{%- from "enum_definition.tmpl" import enum_def -%}
+{% for enum in interface.enums %}
+{{ enum_def("%sProxy.%s"|format(interface.name, enum.name), enum)}}
+ {{interface.name}}Stub.{{enum.name}} = {{interface.name}}Proxy.{{enum.name}};
abarth-chromium 2013/12/20 04:40:24 Do we want these to be the same object or two diff
Matt Perry 2014/01/06 19:55:11 Is there a difference?
+{%- endfor %}

Powered by Google App Engine
This is Rietveld 408576698