| Index: sdk/lib/html/scripts/htmldartgenerator.py
|
| ===================================================================
|
| --- sdk/lib/html/scripts/htmldartgenerator.py (revision 14920)
|
| +++ sdk/lib/html/scripts/htmldartgenerator.py (working copy)
|
| @@ -182,17 +182,21 @@
|
| implements.append('List<%s>' % item_type_info.dart_type())
|
| return implements
|
|
|
| - def AddConstructors(self, constructors, factory_provider, class_name,
|
| - base_class):
|
| + def AddConstructors(self, constructors, factory_name, class_name,
|
| + base_class, factory_constructor_name=None):
|
| """ Adds all of the constructors.
|
| Arguments:
|
| constructors - List of the constructors to be added.
|
| - factory_provider - Name of the factory provider for this class.
|
| + factory_name - Name of the factory for this class.
|
| class_name - The name of this class.
|
| base_class - The name of the base class which this extends.
|
| + factory_constructor_name - The name of the constructor on the
|
| + factory_name to call (calls an autogenerated FactoryProvider
|
| + if unspecified)
|
| """
|
| for constructor_info in constructors:
|
| - self._AddConstructor(constructor_info, factory_provider)
|
| + self._AddConstructor(constructor_info, factory_name,
|
| + factory_constructor_name, constructor_info.factory_parameters)
|
|
|
| typed_array_type = None
|
| for interface in self._database.Hierarchy(self._interface):
|
| @@ -214,11 +218,14 @@
|
| ' $FACTORY.create$(CTOR)_fromBuffer(buffer, byteOffset, length);\n',
|
| CTOR=self._interface.id,
|
| TYPE=self._DartType(typed_array_type),
|
| - FACTORY=factory_provider)
|
| + FACTORY=factory_name)
|
|
|
| - def _AddConstructor(self, constructor_info, factory_provider):
|
| - constructor_info.GenerateFactoryInvocation(
|
| - self._DartType, self._members_emitter, factory_provider)
|
| + def _AddConstructor(self, constructor_info, factory_name,
|
| + factory_constructor_name, factory_constructor_params):
|
| + constructor_info.GenerateFactoryInvocation(
|
| + self._DartType, self._members_emitter, factory_name,
|
| + factory_constructor_name=factory_constructor_name,
|
| + factory_parameters=factory_constructor_params)
|
|
|
| def DeclareAttribute(self, attribute, type_name, attr_name, read_only):
|
| """ Declares an attribute but does not include the code to invoke it.
|
|
|