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

Unified Diff: lib/html/scripts/systemhtml.py

Issue 11040059: Add interface_name and implementation_name to IDLTypeInfo class and use them instead of dart_type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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
« lib/html/scripts/generator.py ('K') | « lib/html/scripts/generator.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/scripts/systemhtml.py
diff --git a/lib/html/scripts/systemhtml.py b/lib/html/scripts/systemhtml.py
index bc819a3cff35200612382a12a5e8d871a023eb32..090f2c51db178fba462c1ab4ae63354ec5967c3a 100644
--- a/lib/html/scripts/systemhtml.py
+++ b/lib/html/scripts/systemhtml.py
@@ -257,17 +257,19 @@ class HtmlDartInterfaceGenerator(object):
suppressed_implements = []
for parent in self._interface.parents:
+ parent_type_info = self._type_registry.TypeInfo(parent.type.id)
+ parent_interface_name = parent_type_info.interface_name()
# TODO(vsm): Remove source_filter.
if MatchSourceFilter(parent):
# Parent is a DOM type.
- implements.append(self._DartType(parent.type.id))
+ implements.append(parent_interface_name)
elif '<' in parent.type.id:
# Parent is a Dart collection type.
# TODO(vsm): Make this check more robust.
- implements.append(self._DartType(parent.type.id))
+ implements.append(parent_interface_name)
else:
suppressed_implements.append('%s.%s' %
- (self._common_prefix, self._DartType(parent.type.id)))
+ (self._common_prefix, parent_interface_name))
if typename in _secure_base_types:
implements.append(_secure_base_types[typename])
@@ -337,7 +339,8 @@ class HtmlDartInterfaceGenerator(object):
implementation_emitter = emitter.Emitter()
base_class = self._backend.BaseClassName()
- implemented_interfaces = [self._html_interface_name] +\
+ interface_type_info = self._type_registry.TypeInfo(self._interface.id)
+ implemented_interfaces = [interface_type_info.interface_name()] +\
self._backend.AdditionalImplementedInterfaces()
self._implementation_members_emitter = implementation_emitter.Emit(
self._backend.ImplementationTemplate(),
@@ -628,7 +631,7 @@ class Dart2JSBackend(object):
elif supertype == 'NodeList':
# Special case as NodeList gets converted to List<Node>.
return '_NodeListImpl'
- return self._ImplClassName(self._DartType(supertype))
+ return self._type_registry.TypeInfo(supertype).implementation_name()
def AdditionalImplementedInterfaces(self):
# TODO: Include all implemented interfaces, including other Lists.
« lib/html/scripts/generator.py ('K') | « lib/html/scripts/generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698