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

Unified Diff: tools/json_schema_compiler/model.py

Issue 143473003: Generate ax enums from idl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Caught Blink enum conversion bug! Created 6 years, 10 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/json_schema_compiler/idl_schema.py ('k') | ui/accessibility/accessibility.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/model.py
diff --git a/tools/json_schema_compiler/model.py b/tools/json_schema_compiler/model.py
index e0dabb14a5b7ad45e1d8be9f8878a124d59f2134..967e9abec0041ef9d2d7c7de6378d7abbd7ee1e3 100644
--- a/tools/json_schema_compiler/model.py
+++ b/tools/json_schema_compiler/model.py
@@ -107,6 +107,7 @@ class Namespace(object):
self.unix_name = UnixName(self.name)
self.source_file = source_file
self.source_file_dir, self.source_file_filename = os.path.split(source_file)
+ self.short_filename = os.path.basename(source_file).split('.')[0]
self.parent = None
self.platforms = _GetPlatforms(json)
toplevel_origin = Origin(from_client=True, from_json=True)
@@ -189,6 +190,7 @@ class Type(object):
elif 'enum' in json and json_type == 'string':
self.property_type = PropertyType.ENUM
self.enum_values = [EnumValue(value) for value in json['enum']]
+ self.cpp_omit_enum_type = 'cpp_omit_enum_type' in json
elif json_type == 'any':
self.property_type = PropertyType.ANY
elif json_type == 'binary':
« no previous file with comments | « tools/json_schema_compiler/idl_schema.py ('k') | ui/accessibility/accessibility.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698