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 systems to generate | 6 """This module provides shared functionality for systems to generate |
7 Dart APIs from the IDL database.""" | 7 Dart APIs from the IDL database.""" |
8 | 8 |
9 import copy | 9 import copy |
10 import re | 10 import re |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 "@SupportedBrowser(SupportedBrowser.FIREFOX)", | 627 "@SupportedBrowser(SupportedBrowser.FIREFOX)", |
628 "@SupportedBrowser(SupportedBrowser.IE, '10')", | 628 "@SupportedBrowser(SupportedBrowser.IE, '10')", |
629 "@SupportedBrowser(SupportedBrowser.SAFARI)", | 629 "@SupportedBrowser(SupportedBrowser.SAFARI)", |
630 ] | 630 ] |
631 | 631 |
632 # Annotations to be placed on generated members. | 632 # Annotations to be placed on generated members. |
633 # The table is indexed as: | 633 # The table is indexed as: |
634 # INTERFACE: annotations to be added to the interface declaration | 634 # INTERFACE: annotations to be added to the interface declaration |
635 # INTERFACE.MEMBER: annotation to be added to the member declaration | 635 # INTERFACE.MEMBER: annotation to be added to the member declaration |
636 dart_annotations = { | 636 dart_annotations = { |
| 637 'ArrayBuffer': [ |
| 638 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 639 "@SupportedBrowser(SupportedBrowser.FIREFOX)", |
| 640 "@SupportedBrowser(SupportedBrowser.IE, '10')", |
| 641 "@SupportedBrowser(SupportedBrowser.SAFARI)", |
| 642 ], |
| 643 'ArrayBufferView': [ |
| 644 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 645 "@SupportedBrowser(SupportedBrowser.FIREFOX)", |
| 646 "@SupportedBrowser(SupportedBrowser.IE, '10')", |
| 647 "@SupportedBrowser(SupportedBrowser.SAFARI)", |
| 648 ], |
637 'DOMWindow.indexedDB': _indexed_db_annotations, | 649 'DOMWindow.indexedDB': _indexed_db_annotations, |
638 'History.pushState': _history_annotations, | 650 'History.pushState': _history_annotations, |
639 'History.replaceState': _history_annotations, | 651 'History.replaceState': _history_annotations, |
640 'HTMLContentElement': [ | 652 'HTMLContentElement': [ |
641 "@SupportedBrowser(SupportedBrowser.CHROME, '25')", | 653 "@SupportedBrowser(SupportedBrowser.CHROME, '25')", |
642 "@Experimental()", | 654 "@Experimental()", |
643 ], | 655 ], |
644 'HTMLDataListElement': [ | 656 'HTMLDataListElement': [ |
645 "@SupportedBrowser(SupportedBrowser.CHROME)", | 657 "@SupportedBrowser(SupportedBrowser.CHROME)", |
646 "@SupportedBrowser(SupportedBrowser.FIREFOX)", | 658 "@SupportedBrowser(SupportedBrowser.FIREFOX)", |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1268 self) | 1280 self) |
1269 | 1281 |
1270 if type_data.clazz == 'SVGTearOff': | 1282 if type_data.clazz == 'SVGTearOff': |
1271 dart_interface_name = self._renamer.RenameInterface( | 1283 dart_interface_name = self._renamer.RenameInterface( |
1272 self._database.GetInterface(type_name)) | 1284 self._database.GetInterface(type_name)) |
1273 return SVGTearOffIDLTypeInfo( | 1285 return SVGTearOffIDLTypeInfo( |
1274 type_name, type_data, dart_interface_name, self) | 1286 type_name, type_data, dart_interface_name, self) |
1275 | 1287 |
1276 class_name = '%sIDLTypeInfo' % type_data.clazz | 1288 class_name = '%sIDLTypeInfo' % type_data.clazz |
1277 return globals()[class_name](type_name, type_data) | 1289 return globals()[class_name](type_name, type_data) |
OLD | NEW |