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

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

Issue 11118025: Extract common logic from Backend.BaseClassName(). (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
« no previous file with comments | « lib/html/scripts/systemhtml.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/systemnative.py
diff --git a/lib/html/scripts/systemnative.py b/lib/html/scripts/systemnative.py
index 02407bd4256f72f979f995a25fd0f2912b7459dc..081863862459743f67525e067762602691251369 100644
--- a/lib/html/scripts/systemnative.py
+++ b/lib/html/scripts/systemnative.py
@@ -101,6 +101,9 @@ class DartiumBackend(object):
template = self._template_loader.Load('dart_implementation.darttemplate')
return template
+ def RootClassName(self):
+ return 'NativeFieldWrapperClass1'
+
def AdditionalImplementedInterfaces(self):
return []
@@ -172,27 +175,6 @@ class DartiumBackend(object):
self._interface.id,
'ConstructorRaisesException' in ext_attrs)
- def BaseClassName(self):
- root_class = 'NativeFieldWrapperClass1'
-
- if not self._interface.parents:
- return root_class
-
- supertype = self._interface.parents[0].type.id
-
- if IsPureInterface(supertype): # The class is a root.
- return root_class
-
- # FIXME: We're currently injecting List<..> and EventTarget as
- # supertypes in dart.idl. We should annotate/preserve as
- # attributes instead. For now, this hack lets the self._interfaces
- # inherit, but not the classes.
- # List methods are injected in AddIndexer.
- if IsDartListType(supertype) or IsDartCollectionType(supertype):
- return root_class
-
- return self._type_registry.TypeInfo(supertype).implementation_name()
-
ATTRIBUTES_OF_CONSTRUCTABLE = set([
'CustomConstructor',
'V8CustomConstructor',
« no previous file with comments | « lib/html/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698