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

Side by Side Diff: sdk/lib/html/scripts/systemhtml.py

Issue 11280103: Splitting out the Audio library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Syncing. Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality for the system to generate 6 """This module provides shared functionality for the system to generate
7 Dart:html APIs from the IDL database.""" 7 Dart:html APIs from the IDL database."""
8 8
9 import emitter 9 import emitter
10 import os 10 import os
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 'TextElement': 'text', 194 'TextElement': 'text',
195 'TitleElement': 'title', 195 'TitleElement': 'title',
196 'TRefElement': 'tref', 196 'TRefElement': 'tref',
197 'TSpanElement': 'tspan', 197 'TSpanElement': 'tspan',
198 'UseElement': 'use', 198 'UseElement': 'use',
199 'ViewElement': 'view', 199 'ViewElement': 'view',
200 'VKernElement': 'vkern', 200 'VKernElement': 'vkern',
201 } 201 }
202 202
203 _element_constructors = { 203 _element_constructors = {
204 'audio': {},
204 'html': _html_element_constructors, 205 'html': _html_element_constructors,
205 'svg': _svg_element_constructors 206 'svg': _svg_element_constructors,
206 } 207 }
207 208
208 _factory_ctr_strings = { 209 _factory_ctr_strings = {
210 'audio': {
Emily Fortuna 2012/11/20 22:38:17 :-)
211 'provider_name': 'document',
212 'constructor_name': '$dom_createElement'
213 },
209 'html': { 214 'html': {
210 'provider_name': 'document', 215 'provider_name': 'document',
211 'constructor_name': '$dom_createElement' 216 'constructor_name': '$dom_createElement'
212 }, 217 },
213 'svg': { 218 'svg': {
214 'provider_name': '_SvgElementFactoryProvider', 219 'provider_name': '_SvgElementFactoryProvider',
215 'constructor_name': 'createSvgElement_tag', 220 'constructor_name': 'createSvgElement_tag',
216 }, 221 },
217 } 222 }
218 223
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 for path in sorted(self._paths): 979 for path in sorted(self._paths):
975 relpath = os.path.relpath(path, library_file_dir) 980 relpath = os.path.relpath(path, library_file_dir)
976 imports_emitter.Emit( 981 imports_emitter.Emit(
977 "part '$PATH';\n", PATH=massage_path(relpath)) 982 "part '$PATH';\n", PATH=massage_path(relpath))
978 983
979 # ------------------------------------------------------------------------------ 984 # ------------------------------------------------------------------------------
980 985
981 class DartLibraries(): 986 class DartLibraries():
982 def __init__(self, template_loader, library_type, output_dir): 987 def __init__(self, template_loader, library_type, output_dir):
983 self._libraries = { 988 self._libraries = {
989 'audio': DartLibrary('audio', template_loader, library_type, output_dir),
990 'html': DartLibrary('html', template_loader, library_type, output_dir),
984 'svg': DartLibrary('svg', template_loader, library_type, output_dir), 991 'svg': DartLibrary('svg', template_loader, library_type, output_dir),
985 'html': DartLibrary('html', template_loader, library_type, output_dir),
986 } 992 }
987 993
988 def AddFile(self, basename, library_name, path): 994 def AddFile(self, basename, library_name, path):
989 self._libraries[library_name].AddFile(path) 995 self._libraries[library_name].AddFile(path)
990 996
991 def Emit(self, emitter, auxiliary_dir): 997 def Emit(self, emitter, auxiliary_dir):
992 for lib in self._libraries.values(): 998 for lib in self._libraries.values():
993 lib.Emit(emitter, auxiliary_dir) 999 lib.Emit(emitter, auxiliary_dir)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698