OLD | NEW |
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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 'SVGFilterElement', | 348 'SVGFilterElement', |
349 'SVGForeignObjectElement', | 349 'SVGForeignObjectElement', |
350 'SVGSetElement', | 350 'SVGSetElement', |
351 ] | 351 ] |
352 | 352 |
353 js_support_checks = dict({ | 353 js_support_checks = dict({ |
354 'ArrayBuffer': "JS('bool', 'typeof window.ArrayBuffer != \"undefined\"')", | 354 'ArrayBuffer': "JS('bool', 'typeof window.ArrayBuffer != \"undefined\"')", |
355 'Database': "JS('bool', '!!(window.openDatabase)')", | 355 'Database': "JS('bool', '!!(window.openDatabase)')", |
356 'DOMApplicationCache': "JS('bool', '!!(window.applicationCache)')", | 356 'DOMApplicationCache': "JS('bool', '!!(window.applicationCache)')", |
357 'DOMFileSystem': "JS('bool', '!!(window.webkitRequestFileSystem)')", | 357 'DOMFileSystem': "JS('bool', '!!(window.webkitRequestFileSystem)')", |
| 358 'FormData': "JS('bool', '!!(window.FormData)')", |
358 'HashChangeEvent': "Event._isTypeSupported('HashChangeEvent')", | 359 'HashChangeEvent': "Event._isTypeSupported('HashChangeEvent')", |
359 'HTMLShadowElement': ElemSupportStr('shadow'), | 360 'HTMLShadowElement': ElemSupportStr('shadow'), |
360 'MediaStreamEvent': "Event._isTypeSupported('MediaStreamEvent')", | 361 'MediaStreamEvent': "Event._isTypeSupported('MediaStreamEvent')", |
361 'MediaStreamTrackEvent': "Event._isTypeSupported('MediaStreamTrackEvent')", | 362 'MediaStreamTrackEvent': "Event._isTypeSupported('MediaStreamTrackEvent')", |
362 'NotificationCenter': "JS('bool', '!!(window.webkitNotifications)')", | 363 'NotificationCenter': "JS('bool', '!!(window.webkitNotifications)')", |
363 'Performance': "JS('bool', '!!(window.performance)')", | 364 'Performance': "JS('bool', '!!(window.performance)')", |
364 'SpeechRecognition': "JS('bool', '!!(window.SpeechRecognition || " | 365 'SpeechRecognition': "JS('bool', '!!(window.SpeechRecognition || " |
365 "window.webkitSpeechRecognition)')", | 366 "window.webkitSpeechRecognition)')", |
366 'SVGExternalResourcesRequired': ('supported(SvgElement element)', | 367 'SVGExternalResourcesRequired': ('supported(SvgElement element)', |
367 "JS('bool', '#.externalResourcesRequired !== undefined && " | 368 "JS('bool', '#.externalResourcesRequired !== undefined && " |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 for library_name in libraries: | 1109 for library_name in libraries: |
1109 self._libraries[library_name] = DartLibrary( | 1110 self._libraries[library_name] = DartLibrary( |
1110 library_name, template_loader, library_type, output_dir) | 1111 library_name, template_loader, library_type, output_dir) |
1111 | 1112 |
1112 def AddFile(self, basename, library_name, path): | 1113 def AddFile(self, basename, library_name, path): |
1113 self._libraries[library_name].AddFile(path) | 1114 self._libraries[library_name].AddFile(path) |
1114 | 1115 |
1115 def Emit(self, emitter, auxiliary_dir): | 1116 def Emit(self, emitter, auxiliary_dir): |
1116 for lib in self._libraries.values(): | 1117 for lib in self._libraries.values(): |
1117 lib.Emit(emitter, auxiliary_dir) | 1118 lib.Emit(emitter, auxiliary_dir) |
OLD | NEW |