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

Unified Diff: tools/dom/scripts/generator.py

Issue 13704011: Map enums to strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
« no previous file with comments | « tools/dom/scripts/databasebuilder.py ('k') | tools/dom/scripts/idlnode.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/generator.py
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
index 08b244ff9cd943042b7b0dece8fde3a7f329709b..22589620601924abe9315bb5e848ab8135e906e2 100644
--- a/tools/dom/scripts/generator.py
+++ b/tools/dom/scripts/generator.py
@@ -1544,6 +1544,11 @@ class TypeRegistry(object):
return SequenceIDLTypeInfo(type_name, TypeData('Sequence'), item_info)
if not type_name in _idl_type_registry:
+ if self._database.HasEnum(type_name):
+ return PrimitiveIDLTypeInfo(
+ type_name,
+ TypeData(clazz='Primitive', dart_type='String', native_type='String'))
+
interface = self._database.GetInterface(type_name)
if 'Callback' in interface.ext_attrs:
return CallbackIDLTypeInfo(type_name, TypeData('Callback',
« no previous file with comments | « tools/dom/scripts/databasebuilder.py ('k') | tools/dom/scripts/idlnode.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698