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

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

Issue 10704008: Make HtmlFrogSystem and NativeImplementationSystem the backends for HtmlInterfacesSystem and remove… (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
« lib/dom/scripts/dartdomgenerator.py ('K') | « lib/dom/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/dom/scripts/systemnative.py
diff --git a/lib/dom/scripts/systemnative.py b/lib/dom/scripts/systemnative.py
index c0ba0af67b8c5906daf69de778d34bbd4e37f525..dc5b3a204735cb32bcd56ce86be9c3620c89f2ba 100644
--- a/lib/dom/scripts/systemnative.py
+++ b/lib/dom/scripts/systemnative.py
@@ -16,10 +16,10 @@ from systemhtml import EmitHtmlElementFactoryConstructors
class NativeImplementationSystem(systembase.System):
- def __init__(self, templates, database, emitters, output_dir):
+ def __init__(self, templates, database, emitters, output_dir, auxiliary_dir):
super(NativeImplementationSystem, self).__init__(
templates, database, emitters, output_dir)
-
+ self._auxiliary_dir = auxiliary_dir
self._dom_impl_files = []
self._cpp_header_files = []
self._cpp_impl_files = []
@@ -120,7 +120,15 @@ class NativeImplementationSystem(systembase.System):
INTERFACE=self._interface.id,
HANDLERS=cpp_impl_handlers_emitter.Fragments())
- def GenerateLibraries(self):
+ def GenerateLibraries(self, interface_files):
+ # Generate dart:html library.
+ auxiliary_dir = os.path.relpath(self._auxiliary_dir, self._output_dir)
+ self._GenerateLibFile(
+ 'html_dartium.darttemplate',
+ os.path.join(self._output_dir, 'html_dartium.dart'),
+ interface_files + self._dom_impl_files,
+ AUXILIARY_DIR=systembase.MassagePath(auxiliary_dir))
+
# Generate DartDerivedSourcesXX.cpp.
partitions = 20 # FIXME: this should be configurable.
sources_count = len(self._cpp_impl_files)
@@ -183,9 +191,6 @@ class NativeImplementationSystem(systembase.System):
self._factory_provider_emitters[name] = file_emitter.Emit(template)
return self._factory_provider_emitters[name]
- def DartImplementationFiles(self):
- return self._dom_impl_files
-
class NativeImplementationGenerator(systembase.BaseGenerator):
"""Generates Dart implementation for one DOM IDL interface."""
« lib/dom/scripts/dartdomgenerator.py ('K') | « lib/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698