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

Unified Diff: lib/dom/scripts/systemfrog.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/systembase.py ('k') | lib/dom/scripts/systemhtml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/systemfrog.py
diff --git a/lib/dom/scripts/systemfrog.py b/lib/dom/scripts/systemfrog.py
index 21faff5e75fae7cbd1c764324c93372c400dd4e6..0deb19a7304423c4c93f523bbf9ee5a9db44f2a6 100644
--- a/lib/dom/scripts/systemfrog.py
+++ b/lib/dom/scripts/systemfrog.py
@@ -29,11 +29,7 @@ class FrogSystem(System):
templates, database, emitters, output_dir)
self._impl_file_paths = []
- def InterfaceGenerator(self,
- interface,
- common_prefix,
- super_interface_name,
- source_filter):
+ def ProcessInterface(self, interface):
"""."""
if IsPureInterface(interface.id):
return
@@ -43,8 +39,7 @@ class FrogSystem(System):
template = self._templates.Load('frog_impl.darttemplate')
dart_code = self._ImplFileEmitter(interface.id)
- return FrogInterfaceGenerator(self, interface, template,
- super_interface_name, dart_code)
+ FrogInterfaceGenerator(self, interface, template, dart_code).Generate()
def GenerateLibraries(self):
self._GenerateLibFile(
@@ -68,7 +63,7 @@ class FrogSystem(System):
class FrogInterfaceGenerator(BaseGenerator):
"""Generates a Frog class for a DOM IDL interface."""
- def __init__(self, system, interface, template, super_interface, dart_code):
+ def __init__(self, system, interface, template, dart_code):
"""Generates Dart code for the given interface.
Args:
@@ -77,16 +72,13 @@ class FrogInterfaceGenerator(BaseGenerator):
been converted to Dart types (e.g. int, String), unless they are in
the same package as the interface.
template: A string template.
- super_interface: A string or None, the name of the common interface that
- this interface implements, if any.
dart_code: an Emitter for the file containing the Dart implementation
class.
"""
- super(FrogInterfaceGenerator, self).__init__(system._database)
+ super(FrogInterfaceGenerator, self).__init__(system._database, interface)
self._system = system
self._interface = interface
self._template = template
- self._super_interface = super_interface
self._dart_code = dart_code
self._current_secondary_parent = None
« no previous file with comments | « lib/dom/scripts/systembase.py ('k') | lib/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698