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

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

Issue 11045020: Merge BaseGenerator into HtmlDartInterfaceGenerator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/html/scripts/systemhtml.py ('K') | « lib/html/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/html/scripts/systemnative.py
diff --git a/lib/html/scripts/systemnative.py b/lib/html/scripts/systemnative.py
index 4fbf2ed99e8fe4745a94486cbab48dd7c05df441..42094b59b4fb270e7707053a74dddad71e071a3e 100644
--- a/lib/html/scripts/systemnative.py
+++ b/lib/html/scripts/systemnative.py
@@ -9,17 +9,17 @@ native binding from the IDL database."""
import emitter
import os
from generator import *
-from systembase import BaseGenerator
-class DartiumBackend(BaseGenerator):
+class DartiumBackend(object):
"""Generates Dart implementation for one DOM IDL interface."""
def __init__(self, interface, cpp_library_emitter, options):
- super(DartiumBackend, self).__init__(
- options.database, options.type_registry, interface)
+ self._interface = interface
self._cpp_library_emitter = cpp_library_emitter
+ self._database = options.database
self._template_loader = options.templates
+ self._type_registry = options.type_registry
self._html_interface_name = options.renamer.RenameInterface(self._interface)
def HasImplementation(self):
@@ -853,6 +853,12 @@ class DartiumBackend(BaseGenerator):
lambda s: 'is' + s.group(1).capitalize(),
name)
+ def _TypeInfo(self, type_name):
+ return self._type_registry.TypeInfo(type_name)
+
+ def _DartType(self, type_name):
+ return self._type_registry.DartType(type_name)
+
class CPPLibraryEmitter():
def __init__(self, emitters, cpp_sources_dir):
« lib/html/scripts/systemhtml.py ('K') | « lib/html/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698