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

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

Issue 17508002: Revert "Making all DOM types abstract and removing superfluous Dartium constructors." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/templates/html/dart2js/impl_Console.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/systemnative.py
diff --git a/tools/dom/scripts/systemnative.py b/tools/dom/scripts/systemnative.py
index b21364faae616300342d68accc2edf73032e9cb5..648f2eb059359fc8b28f62634967c2c18909b129 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -198,6 +198,21 @@ class DartiumBackend(HtmlDartGenerator):
'}\n',
INTERFACE_NAME=self._interface.id);
+ def EmitHelpers(self, base_class):
+ # Emit internal constructor which is necessary for Dartium bindings
+ # to construct wrappers from C++. Eventually it should go away
+ # once it is possible to construct such an instance directly.
+ if not self._members_emitter:
+ return
+
+ super_constructor = ''
+ if base_class and base_class != 'NativeFieldWrapperClass1':
+ super_constructor = ' : super.internal()'
+ self._members_emitter.Emit(
+ ' $CLASSNAME.internal()$SUPERCONSTRUCTOR;\n',
+ CLASSNAME=self._interface_type_info.implementation_name(),
+ SUPERCONSTRUCTOR=super_constructor)
+
def _EmitConstructorInfrastructure(self,
constructor_info, constructor_callback_cpp_name, factory_method_name,
argument_count=None):
« no previous file with comments | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/templates/html/dart2js/impl_Console.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698