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

Unified Diff: sdk/lib/html/scripts/systemhtml.py

Issue 11419300: Dartifying dart:html type names. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporating review feedback. Created 8 years 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
Index: sdk/lib/html/scripts/systemhtml.py
diff --git a/sdk/lib/html/scripts/systemhtml.py b/sdk/lib/html/scripts/systemhtml.py
index b83b2679f4c875a91f6be03aaca674f00aa431d2..7f5e2f1a733f87bb1ddb1a2ac219a0056a2608a8 100644
--- a/sdk/lib/html/scripts/systemhtml.py
+++ b/sdk/lib/html/scripts/systemhtml.py
@@ -42,6 +42,7 @@ _js_custom_members = set([
'Window.requestAnimationFrame',
'Window.webkitCancelAnimationFrame',
'Window.webkitRequestAnimationFrame',
+ 'WorkerContext.indexedDB',
])
@@ -203,6 +204,7 @@ _svg_element_constructors = {
_element_constructors = {
'html': _html_element_constructors,
+ 'indexed_db': {},
'svg': _svg_element_constructors,
'web_audio': {},
}
@@ -212,6 +214,10 @@ _factory_ctr_strings = {
'provider_name': 'document',
'constructor_name': '$dom_createElement'
},
+ 'indexed_db': {
+ 'provider_name': 'document',
+ 'constructor_name': '$dom_createElement'
+ },
'svg': {
'provider_name': '_SvgElementFactoryProvider',
'constructor_name': 'createSvgElement_tag',
@@ -270,6 +276,8 @@ class HtmlDartInterfaceGenerator(object):
code = self._library_emitter.FileEmitter(self._interface.id,
self._library_name)
code.Emit(self._template_loader.Load('callback.darttemplate'))
+
+ typedef_name = self._renamer.RenameInterface(self._interface)
code.Emit('typedef void $NAME($PARAMS);\n',
NAME=self._interface.id,
PARAMS=info.ParametersDeclaration(self._DartType))

Powered by Google App Engine
This is Rietveld 408576698