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

Unified Diff: sdk/lib/html/scripts/htmldartgenerator.py

Issue 11412042: "Reverting 15020" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « sdk/lib/html/scripts/generator.py ('k') | sdk/lib/html/scripts/systemhtml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/scripts/htmldartgenerator.py
diff --git a/sdk/lib/html/scripts/htmldartgenerator.py b/sdk/lib/html/scripts/htmldartgenerator.py
index 0e109da0f5c80143b3a1f4fee86b4b455e34569d..0dd7ab7ae7f89b879efcbdf8226a3cd00e03f5e4 100644
--- a/sdk/lib/html/scripts/htmldartgenerator.py
+++ b/sdk/lib/html/scripts/htmldartgenerator.py
@@ -182,21 +182,17 @@ class HtmlDartGenerator(object):
implements.append('List<%s>' % item_type_info.dart_type())
return implements
- def AddConstructors(self, constructors, factory_name, class_name,
- base_class, factory_constructor_name=None):
+ def AddConstructors(self, constructors, factory_provider, class_name,
+ base_class):
""" Adds all of the constructors.
Arguments:
constructors - List of the constructors to be added.
- factory_name - Name of the factory for this class.
+ factory_provider - Name of the factory provider 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_name,
- factory_constructor_name, constructor_info.factory_parameters)
+ self._AddConstructor(constructor_info, factory_provider)
typed_array_type = None
for interface in self._database.Hierarchy(self._interface):
@@ -218,14 +214,11 @@ class HtmlDartGenerator(object):
' $FACTORY.create$(CTOR)_fromBuffer(buffer, byteOffset, length);\n',
CTOR=self._interface.id,
TYPE=self._DartType(typed_array_type),
- FACTORY=factory_name)
-
- 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)
+ FACTORY=factory_provider)
+
+ def _AddConstructor(self, constructor_info, factory_provider):
+ constructor_info.GenerateFactoryInvocation(
+ self._DartType, self._members_emitter, factory_provider)
def DeclareAttribute(self, attribute, type_name, attr_name, read_only):
""" Declares an attribute but does not include the code to invoke it.
« no previous file with comments | « sdk/lib/html/scripts/generator.py ('k') | sdk/lib/html/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698