| 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 logging | 10 import logging |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 'SVGForeignObjectElement', | 405 'SVGForeignObjectElement', |
| 406 'SVGSetElement', | 406 'SVGSetElement', |
| 407 ] | 407 ] |
| 408 | 408 |
| 409 js_support_checks = dict({ | 409 js_support_checks = dict({ |
| 410 'AudioContext': "JS('bool', '!!(window.AudioContext ||" | 410 'AudioContext': "JS('bool', '!!(window.AudioContext ||" |
| 411 " window.webkitAudioContext)')", | 411 " window.webkitAudioContext)')", |
| 412 'Crypto': | 412 'Crypto': |
| 413 "JS('bool', '!!(window.crypto && window.crypto.getRandomValues)')", | 413 "JS('bool', '!!(window.crypto && window.crypto.getRandomValues)')", |
| 414 'Database': "JS('bool', '!!(window.openDatabase)')", | 414 'Database': "JS('bool', '!!(window.openDatabase)')", |
| 415 'DOMPoint': "JS('bool', '!!(window.DOMPoint) || !!(window.WebKitPoint)')", |
| 415 'ApplicationCache': "JS('bool', '!!(window.applicationCache)')", | 416 'ApplicationCache': "JS('bool', '!!(window.applicationCache)')", |
| 416 'DOMFileSystem': "JS('bool', '!!(window.webkitRequestFileSystem)')", | 417 'DOMFileSystem': "JS('bool', '!!(window.webkitRequestFileSystem)')", |
| 417 'FormData': "JS('bool', '!!(window.FormData)')", | 418 'FormData': "JS('bool', '!!(window.FormData)')", |
| 418 'HashChangeEvent': "Device.isEventTypeSupported('HashChangeEvent')", | 419 'HashChangeEvent': "Device.isEventTypeSupported('HashChangeEvent')", |
| 419 'HTMLShadowElement': ElemSupportStr('shadow'), | 420 'HTMLShadowElement': ElemSupportStr('shadow'), |
| 420 'HTMLTemplateElement': ElemSupportStr('template'), | 421 'HTMLTemplateElement': ElemSupportStr('template'), |
| 421 'MediaStreamEvent': "Device.isEventTypeSupported('MediaStreamEvent')", | 422 'MediaStreamEvent': "Device.isEventTypeSupported('MediaStreamEvent')", |
| 422 'MediaStreamTrackEvent': "Device.isEventTypeSupported('MediaStreamTrackEvent
')", | 423 'MediaStreamTrackEvent': "Device.isEventTypeSupported('MediaStreamTrackEvent
')", |
| 423 'NotificationCenter': "JS('bool', '!!(window.webkitNotifications)')", | 424 'NotificationCenter': "JS('bool', '!!(window.webkitNotifications)')", |
| 424 'Performance': "JS('bool', '!!(window.performance)')", | 425 'Performance': "JS('bool', '!!(window.performance)')", |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1273 | 1274 |
| 1274 def AddFile(self, basename, library_name, path): | 1275 def AddFile(self, basename, library_name, path): |
| 1275 self._libraries[library_name].AddFile(path) | 1276 self._libraries[library_name].AddFile(path) |
| 1276 | 1277 |
| 1277 def AddTypeEntry(self, library_name, idl_name, dart_name): | 1278 def AddTypeEntry(self, library_name, idl_name, dart_name): |
| 1278 self._libraries[library_name].AddTypeEntry(idl_name, dart_name) | 1279 self._libraries[library_name].AddTypeEntry(idl_name, dart_name) |
| 1279 | 1280 |
| 1280 def Emit(self, emitter, auxiliary_dir): | 1281 def Emit(self, emitter, auxiliary_dir): |
| 1281 for lib in self._libraries.values(): | 1282 for lib in self._libraries.values(): |
| 1282 lib.Emit(emitter, auxiliary_dir) | 1283 lib.Emit(emitter, auxiliary_dir) |
| OLD | NEW |