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

Unified Diff: lib/dom/scripts/systembase.py

Issue 10702202: Introduce TypeRegistry class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 8 years, 5 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: lib/dom/scripts/systembase.py
diff --git a/lib/dom/scripts/systembase.py b/lib/dom/scripts/systembase.py
index f394e584e8018116bf04c0634fcac15eea835708..e0119dd91ec28093de495362ab384acf1b6d2d3f 100644
--- a/lib/dom/scripts/systembase.py
+++ b/lib/dom/scripts/systembase.py
@@ -24,11 +24,12 @@ class System(object):
- Finish
"""
- def __init__(self, templates, database, emitters, output_dir):
- self._templates = templates
- self._database = database
- self._emitters = emitters
- self._output_dir = output_dir
+ def __init__(self, options):
+ self._templates = options.templates
+ self._database = options.database
+ self._emitters = options.emitters
+ self._type_registry = options.type_registry
+ self._output_dir = options.output_dir
def ProcessInterface(self, interface):
"""Processes an interface that is not a callback function."""
@@ -221,6 +222,14 @@ class BaseGenerator(object):
walk(interface.parents[1:])
return result
+class GeneratorOptions(object):
+ def __init__(self, templates, database, emitters, type_registry, output_dir):
+ self.templates = templates
+ self.database = database
+ self.emitters = emitters
+ self.type_registry = type_registry
+ self.output_dir = output_dir
+
def IsReadOnly(attribute):
return attribute.is_read_only or 'Replaceable' in attribute.ext_attrs

Powered by Google App Engine
This is Rietveld 408576698