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

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

Issue 10700006: Make per-interface generators an implementation detail of a system. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 8 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 | « lib/dom/scripts/systemfrog.py ('k') | lib/dom/scripts/systeminterface.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/systemhtml.py
diff --git a/lib/dom/scripts/systemhtml.py b/lib/dom/scripts/systemhtml.py
index 4b2dabf1a6a5756083ff50d768577c71ce6e9d19..323790aed436e9194478e6e4fd2bed20b05826f1 100644
--- a/lib/dom/scripts/systemhtml.py
+++ b/lib/dom/scripts/systemhtml.py
@@ -773,14 +773,10 @@ class HtmlInterfacesSystem(HtmlSystem):
self._dart_interface_file_paths = []
self._factory_provider_emitters = {}
- def InterfaceGenerator(self,
- interface,
- common_prefix,
- super_interface_name,
- source_filter):
+ def ProcessInterface(self, interface):
"""."""
if interface.id in _merged_html_interfaces:
- return None
+ return
html_interface_name = self._shared._HTMLInterfaceName(interface.id)
dart_interface_file_path = self._FilePathForDartInterface(
@@ -795,11 +791,9 @@ class HtmlInterfacesSystem(HtmlSystem):
if not template:
template = self._templates.Load('interface.darttemplate')
- return HtmlDartInterfaceGenerator(
+ HtmlDartInterfaceGenerator(
self, interface, dart_interface_code,
- template,
- common_prefix, super_interface_name,
- source_filter, self._shared)
+ template, self._shared).Generate()
def ProcessCallback(self, interface, info):
"""Generates a typedef for the callback interface."""
@@ -824,10 +818,9 @@ class HtmlInterfacesSystem(HtmlSystem):
class HtmlDartInterfaceGenerator(DartInterfaceGenerator):
"""Generates Dart Interface definition for one DOM IDL interface."""
- def __init__(self, system, interface, emitter, template,
- common_prefix, super_interface, source_filter, shared):
+ def __init__(self, system, interface, emitter, template, shared):
super(HtmlDartInterfaceGenerator, self).__init__(system, interface,
- emitter, template, common_prefix, super_interface, source_filter)
+ emitter, template)
self._shared = shared
self._html_interface_name = self._shared._HTMLInterfaceName(
self._interface.id)
@@ -840,7 +833,7 @@ class HtmlDartInterfaceGenerator(DartInterfaceGenerator):
for parent in self._interface.parents:
# TODO(vsm): Remove source_filter.
- if MatchSourceFilter(self._source_filter, parent):
+ if MatchSourceFilter(parent):
# Parent is a DOM type.
extends.append(self._shared.DartType(parent.type.id))
elif '<' in parent.type.id:
@@ -1023,10 +1016,10 @@ class HtmlFrogClassGenerator(FrogInterfaceGenerator):
interface.
"""
- def __init__(self, system, interface, template, super_interface, dart_code,
+ def __init__(self, system, interface, template, dart_code,
shared):
super(HtmlFrogClassGenerator, self).__init__(
- system, interface, template, super_interface, dart_code)
+ system, interface, template, dart_code)
self._shared = shared
self._html_interface_name = self._shared._HTMLInterfaceName(
self._interface.id)
@@ -1353,11 +1346,7 @@ class HtmlFrogSystem(HtmlSystem):
self._dart_frog_file_paths = []
self._factory_provider_emitters = {}
- def InterfaceGenerator(self,
- interface,
- common_prefix,
- super_interface_name,
- source_filter):
+ def ProcessInterface(self, interface):
"""."""
if interface.id in _merged_html_interfaces:
return None
@@ -1372,8 +1361,9 @@ class HtmlFrogSystem(HtmlSystem):
template = self._templates.Load('frog_impl.darttemplate')
dart_code = self._ImplFileEmitter(html_interface_name)
- return HtmlFrogClassGenerator(self, interface, template,
- super_interface_name, dart_code, self._shared)
+ generator = HtmlFrogClassGenerator(self, interface, template,
+ dart_code, self._shared)
+ generator.Generate()
def GenerateLibraries(self):
self._GenerateLibFile(
@@ -1414,14 +1404,10 @@ class HtmlDartiumSystem(HtmlSystem):
self._auxiliary_dir = auxiliary_dir
self._dom_implementation_classes = dom_implementation_classes
- def InterfaceGenerator(self,
- interface,
- common_prefix,
- super_interface_name,
- source_filter):
+ def ProcessInterface(self, interface):
# Implementation classes are generated by NativeImplementationSystem.
# FIXME: merge HtmlDartiumSystem into NativeImplementationSystem.
- return None
+ pass
def ProcessCallback(self, interface, info):
pass
« no previous file with comments | « lib/dom/scripts/systemfrog.py ('k') | lib/dom/scripts/systeminterface.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698