Index: client/dom/scripts/systeminterface.py |
diff --git a/client/dom/scripts/systeminterface.py b/client/dom/scripts/systeminterface.py |
index e09d46baf631197bea0b8e0169c7b1b2d4813e1e..fb798f688e2ea35c1e39045b8c887d4ac962fae4 100644 |
--- a/client/dom/scripts/systeminterface.py |
+++ b/client/dom/scripts/systeminterface.py |
@@ -115,8 +115,16 @@ class DartInterfaceGenerator(object): |
if suppressed_extends: |
extends_str += ' /*%s %s */' % (comment, ', '.join(suppressed_extends)) |
+ factory_provider = None |
+ constructor_info = AnalyzeConstructor(self._interface) |
+ if constructor_info: |
+ factory_provider = '_' + typename + 'FactoryProvider'; |
+ |
if typename in interface_factories: |
- extends_str += ' default ' + interface_factories[typename] |
+ factory_provider = interface_factories[typename] |
+ |
+ if factory_provider: |
+ extends_str += ' default ' + factory_provider |
# TODO(vsm): Add appropriate package / namespace syntax. |
(self._members_emitter, |
@@ -125,6 +133,13 @@ class DartInterfaceGenerator(object): |
ID=typename, |
EXTENDS=extends_str) |
+ if constructor_info: |
+ self._members_emitter.Emit( |
+ '\n' |
+ ' $CTOR($PARAMS);\n', |
+ CTOR=typename, |
+ PARAMS=constructor_info.ParametersInterfaceDeclaration()); |
+ |
element_type = MaybeTypedArrayElementType(self._interface) |
if element_type: |
self._members_emitter.Emit( |