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

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

Issue 10442057: Native wrappers should implement dart:html interfaces. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 | « no previous file | lib/dom/src/native_DOMImplementation.dart » ('j') | 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 cf95a573d6e25d7d2451755becb35da05c0931ef..696a3d84b660841ced120d40db0515a0c4bce46f 100644
--- a/lib/dom/scripts/systemnative.py
+++ b/lib/dom/scripts/systemnative.py
@@ -356,24 +356,8 @@ class NativeImplementationGenerator(object):
return '_%sDOMImpl' % interface_name
def _DartType(self, idl_type):
Anton Muhin 2012/05/30 00:10:46 do we need this method at all?
- # FIXME: Make dart:html wrapperless and cleanup this method.
- if idl_type in ['EventListener', 'TimeoutHandler']:
- return idl_type
- if idl_type in ['EventTarget', 'IDBAny', 'IDBKey']:
- return 'Dynamic'
- if idl_type == 'DOMStringList':
- return 'List<String>'
-
type_info = GetIDLTypeInfo(idl_type)
- if isinstance(type_info, PrimitiveIDLTypeInfo) or isinstance(type_info, SequenceIDLTypeInfo):
- return type_info.dart_type()
-
- if self._system._database.HasInterface(idl_type):
- interface = self._system._database.GetInterface(idl_type)
- if 'Callback' in interface.ext_attrs:
- return idl_type
- return '_%s' % idl_type
- return idl_type
+ return self._HTMLInterfaceName(type_info.dart_type())
Anton Muhin 2012/05/30 00:10:46 nit: make a one-liner?
def _BaseClassName(self):
if not self._interface.parents:
@@ -436,7 +420,10 @@ class NativeImplementationGenerator(object):
base = self._BaseClassName()
self._dart_impl_emitter.Emit(
self._templates.Load('dart_implementation.darttemplate'),
- CLASS=class_name, BASE=base, INTERFACE=self._interface.id,
+ CLASS=class_name,
+ BASE=base,
+ INTERFACE=self._interface.id,
+ HTML_INTERFACE=self._HTMLInterfaceName(self._interface.id),
MEMBERS=self._members_emitter.Fragments())
self._GenerateCppHeader()
« no previous file with comments | « no previous file | lib/dom/src/native_DOMImplementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698