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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 'HTMLOutputElement': "Element.isTagSupported('output')", | 87 'HTMLOutputElement': "Element.isTagSupported('output')", |
88 'HTMLProgressElement': "Element.isTagSupported('progress')", | 88 'HTMLProgressElement': "Element.isTagSupported('progress')", |
89 'HTMLShadowElement': "Element.isTagSupported('shadow')", | 89 'HTMLShadowElement': "Element.isTagSupported('shadow')", |
90 'HTMLTrackElement': "Element.isTagSupported('track')", | 90 'HTMLTrackElement': "Element.isTagSupported('track')", |
91 'MediaStreamEvent': "Event._isTypeSupported('MediaStreamEvent')", | 91 'MediaStreamEvent': "Event._isTypeSupported('MediaStreamEvent')", |
92 'MediaStreamTrackEvent': "Event._isTypeSupported('MediaStreamTrackEvent')", | 92 'MediaStreamTrackEvent': "Event._isTypeSupported('MediaStreamTrackEvent')", |
93 'NotificationCenter': "JS('bool', '!!(window.webkitNotifications)')", | 93 'NotificationCenter': "JS('bool', '!!(window.webkitNotifications)')", |
94 'Performance': "JS('bool', '!!(window.performance)')", | 94 'Performance': "JS('bool', '!!(window.performance)')", |
95 'SpeechRecognition': "JS('bool', '!!(window.SpeechRecognition || " | 95 'SpeechRecognition': "JS('bool', '!!(window.SpeechRecognition || " |
96 "window.webkitSpeechRecognition)')", | 96 "window.webkitSpeechRecognition)')", |
| 97 'XMLHttpRequestProgressEvent': |
| 98 "Event._isTypeSupported('XMLHttpRequestProgressEvent')", |
97 'WebSocket': "JS('bool', 'typeof window.WebSocket != \"undefined\"')", | 99 'WebSocket': "JS('bool', 'typeof window.WebSocket != \"undefined\"')", |
98 } | 100 } |
99 | 101 |
100 # Classes that offer only static methods, and therefore we should suppress | 102 # Classes that offer only static methods, and therefore we should suppress |
101 # constructor creation. | 103 # constructor creation. |
102 _static_classes = set(['Url']) | 104 _static_classes = set(['Url']) |
103 | 105 |
104 # Information for generating element constructors. | 106 # Information for generating element constructors. |
105 # | 107 # |
106 # TODO(sra): maybe remove all the argument complexity and use cascades. | 108 # TODO(sra): maybe remove all the argument complexity and use cascades. |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 for library_name in libraries: | 1034 for library_name in libraries: |
1033 self._libraries[library_name] = DartLibrary( | 1035 self._libraries[library_name] = DartLibrary( |
1034 library_name, template_loader, library_type, output_dir) | 1036 library_name, template_loader, library_type, output_dir) |
1035 | 1037 |
1036 def AddFile(self, basename, library_name, path): | 1038 def AddFile(self, basename, library_name, path): |
1037 self._libraries[library_name].AddFile(path) | 1039 self._libraries[library_name].AddFile(path) |
1038 | 1040 |
1039 def Emit(self, emitter, auxiliary_dir): | 1041 def Emit(self, emitter, auxiliary_dir): |
1040 for lib in self._libraries.values(): | 1042 for lib in self._libraries.values(): |
1041 lib.Emit(emitter, auxiliary_dir) | 1043 lib.Emit(emitter, auxiliary_dir) |
OLD | NEW |