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

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: Rename ImplementationClassName to ImplementationClassNameForInterfaceName. 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
« no previous file with comments | « 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 4a778d490fc87e3b0e37fbca387ce3fb6b714f65..d02c65a70b73e5ca9767725b22014d8a919a31ac 100644
--- a/lib/html/scripts/systemhtml.py
+++ b/lib/html/scripts/systemhtml.py
@@ -258,17 +258,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])
@@ -338,7 +340,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(),
@@ -629,7 +632,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.
« no previous file with comments | « lib/html/scripts/generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698