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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl

Issue 268363003: Mojo: Add support for constants to the IDL compiler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: JS export constants Created 6 years, 7 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/tools/bindings/generators/cpp_templates/module.h.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
index 4c667aee9d7d3084e373e8e59c6c5a12a9746628..84b95c85562f2e256aaf96234d5619737424bed7 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
@@ -20,6 +20,11 @@
namespace {{namespace}} {
{%- endfor %}
+{#--- Constants #}
+{% for constant in module.constants %}
+extern const {{constant.kind|cpp_pod_type}} {{constant.name}};
+{%- endfor %}
+
{#--- Enums #}
{% for enum in enums %}
{% include "enum_declaration.tmpl" %}

Powered by Google App Engine
This is Rietveld 408576698