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

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

Issue 10696033: Create implementation file emitter in HtmlDartInterfaceGenerator. (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/systemhtml.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 dc5b3a204735cb32bcd56ce86be9c3620c89f2ba..2bdd9cd132705a0104f4f5c3fed5fed2d4248730 100644
--- a/lib/dom/scripts/systemnative.py
+++ b/lib/dom/scripts/systemnative.py
@@ -26,15 +26,9 @@ class NativeImplementationSystem(systembase.System):
self._html_system = HtmlSystemShared(database)
self._factory_provider_emitters = {}
- def ProcessInterface(self, interface):
+ def ProcessInterface(self, interface, dart_implementation_emitter):
interface_name = interface.id
- if IsPureInterface(interface_name):
- return None
-
- dart_impl_path = self._FilePathForDartImplementation(interface_name)
- self._dom_impl_files.append(dart_impl_path)
-
cpp_header_path = self._FilePathForCppHeader(interface_name)
self._cpp_header_files.append(cpp_header_path)
@@ -42,7 +36,7 @@ class NativeImplementationSystem(systembase.System):
self._cpp_impl_files.append(cpp_impl_path)
generator = NativeImplementationGenerator(self, interface,
- self._emitters.FileEmitter(dart_impl_path),
+ dart_implementation_emitter,
self._emitters.FileEmitter(cpp_header_path),
self._emitters.FileEmitter(cpp_impl_path),
self._BaseDefines(interface),
@@ -168,7 +162,10 @@ class NativeImplementationSystem(systembase.System):
def Finish(self):
pass
- def _FilePathForDartImplementation(self, interface_name):
+ def HasImplementation(self, interface):
+ return not IsPureInterface(interface)
+
+ def FilePathForDartImplementation(self, interface_name):
return os.path.join(self._output_dir, 'dart',
'%sImplementation.dart' % interface_name)
« lib/dom/scripts/systemhtml.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