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

Unified Diff: client/dom/scripts/dartgenerator.py

Issue 9231021: Several fixes needed to reuse JS DOM interfaces in dartium. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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
« client/dom/idl/dart/dart.idl ('K') | « client/dom/scripts/dartdomgenerator.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/scripts/dartgenerator.py
diff --git a/client/dom/scripts/dartgenerator.py b/client/dom/scripts/dartgenerator.py
index c18b765e6134bd2e7fc456c7c592a08ee6cf3968..92f80da59e48c4e79f6dc1c3b9f160f956c6fcee 100755
--- a/client/dom/scripts/dartgenerator.py
+++ b/client/dom/scripts/dartgenerator.py
@@ -193,14 +193,16 @@ def _IsDartCollectionType(type):
class DartGenerator(object):
"""Utilities to generate Dart APIs and corresponding JavaScript."""
- def __init__(self, auxiliary_dir, base_package):
+ def __init__(self, auxiliary_dir, template_dir, base_package):
"""Constructor for the DartGenerator.
Args:
auxiliary_dir -- location of auxiliary handwritten classes
+ template_dir -- location of template files
base_package -- the base package name for the generated code.
"""
self._auxiliary_dir = auxiliary_dir
+ self._template_dir = template_dir
self._base_package = base_package
self._auxiliary_files = {}
self._dart_templates_re = re.compile(r'[\w.:]+<([\w\.<>:]+)>')
@@ -424,11 +426,11 @@ class DartGenerator(object):
self._ComputeInheritanceClosure()
interface_system = WrappingInterfacesSystem(
- TemplateLoader('../templates', ['dom/interface', 'dom', '']),
+ TemplateLoader(self._template_dir, ['dom/interface', 'dom', '']),
self._database, self._emitters, self._output_dir)
wrapping_system = WrappingImplementationSystem(
- TemplateLoader('../templates', ['dom/wrapping', 'dom', '']),
+ TemplateLoader(self._template_dir, ['dom/wrapping', 'dom', '']),
self._database, self._emitters, self._output_dir)
# Makes interface files available for listing in the library for the
@@ -436,7 +438,7 @@ class DartGenerator(object):
wrapping_system._interface_system = interface_system
frog_system = FrogSystem(
- TemplateLoader('../templates', ['dom/frog', 'dom', '']),
+ TemplateLoader(self._template_dir, ['dom/frog', 'dom', '']),
self._database, self._emitters, self._output_dir)
self._systems = [interface_system,
« client/dom/idl/dart/dart.idl ('K') | « client/dom/scripts/dartdomgenerator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698