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

Unified Diff: tools/dom/scripts/systemhtml.py

Issue 18054021: Fixing up DOM constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/scripts/systemnative.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/systemhtml.py
diff --git a/tools/dom/scripts/systemhtml.py b/tools/dom/scripts/systemhtml.py
index 90d2610856e7cd158934610b771c677fd00cee79..04e491d95d330c2a376d4e602fd53464e428aadb 100644
--- a/tools/dom/scripts/systemhtml.py
+++ b/tools/dom/scripts/systemhtml.py
@@ -540,9 +540,14 @@ class HtmlDartInterfaceGenerator(object):
self._library_name, self._interface, None, '')
class_modifiers = ''
- if self._renamer.ShouldSuppressInterface(self._interface):
+ if (self._renamer.ShouldSuppressInterface(self._interface) or
+ IsPureInterface(self._interface.id)):
class_modifiers = 'abstract '
+ native_spec = ''
+ if not IsPureInterface(self._interface.id):
+ native_spec = self._backend.NativeSpec()
+
self._implementation_members_emitter = implementation_emitter.Emit(
self._backend.ImplementationTemplate(),
LIBRARYNAME='dart.dom.%s' % self._library_name,
@@ -553,7 +558,7 @@ class HtmlDartInterfaceGenerator(object):
IMPLEMENTS=implements_str,
MIXINS=mixins_str,
DOMNAME=self._interface.doc_js_name,
- NATIVESPEC=self._backend.NativeSpec())
+ NATIVESPEC=native_spec)
self._backend.StartInterface(self._implementation_members_emitter)
self._backend.EmitHelpers(base_class)
@@ -632,9 +637,6 @@ class Dart2JSBackend(HtmlDartGenerator):
return ' native "%s"' % native_spec
def ImplementationTemplate(self):
- if IsPureInterface(self._interface.id):
- return self._template_loader.Load('pure_interface.darttemplate')
-
template_file = ('impl_%s.darttemplate' %
self._interface.doc_js_name)
return (self._template_loader.TryLoad(template_file) or
@@ -897,6 +899,9 @@ class Dart2JSBackend(HtmlDartGenerator):
def AmendIndexer(self, element_type):
pass
+ def RootClassName(self):
+ return 'Interceptor'
+
def EmitOperation(self, info, html_name):
"""
Arguments:
« no previous file with comments | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698