Chromium Code Reviews| 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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 648 "@SupportedBrowser(SupportedBrowser.IE)", | 648 "@SupportedBrowser(SupportedBrowser.IE)", |
| 649 ] | 649 ] |
| 650 | 650 |
| 651 # Annotations to be placed on generated members. | 651 # Annotations to be placed on generated members. |
| 652 # The table is indexed as: | 652 # The table is indexed as: |
| 653 # INTERFACE: annotations to be added to the interface declaration | 653 # INTERFACE: annotations to be added to the interface declaration |
| 654 # INTERFACE.MEMBER: annotation to be added to the member declaration | 654 # INTERFACE.MEMBER: annotation to be added to the member declaration |
| 655 dart_annotations = { | 655 dart_annotations = { |
| 656 'ArrayBuffer': _all_but_ie9_annotations, | 656 'ArrayBuffer': _all_but_ie9_annotations, |
| 657 'ArrayBufferView': _all_but_ie9_annotations, | 657 'ArrayBufferView': _all_but_ie9_annotations, |
| 658 'DOMApplicationCache': [ | |
| 659 "@SupportedBrowser(SupportedBrowser.CHROME)", | |
| 660 "@SupportedBrowser(SupportedBrowser.FIREFOX)", | |
| 661 "@SupportedBrowser(SupportedBrowser.IE, '10')", | |
| 662 "@SupportedBrowser(SupportedBrowser.OPERA)", | |
|
Emily Fortuna
2013/01/15 02:23:07
this is picky, but we should probably rename this
blois
2013/01/15 18:24:34
I'd like to postpone all Opera stuff until later i
| |
| 663 "@SupportedBrowser(SupportedBrowser.SAFARI)", | |
| 664 ], | |
| 658 'DOMWindow.indexedDB': _indexed_db_annotations, | 665 'DOMWindow.indexedDB': _indexed_db_annotations, |
| 659 'DOMWindow.performance': _performance_annotations, | 666 'DOMWindow.performance': _performance_annotations, |
| 660 'DOMWindow.webkitRequestFileSystem': _file_system_annotations, | 667 'DOMWindow.webkitRequestFileSystem': _file_system_annotations, |
| 661 'DOMWindow.webkitResolveLocalFileSystemURL': _file_system_annotations, | 668 'DOMWindow.webkitResolveLocalFileSystemURL': _file_system_annotations, |
| 662 'Element.webkitCreateShadowRoot': [ | 669 'Element.webkitCreateShadowRoot': [ |
| 663 "@SupportedBrowser(SupportedBrowser.CHROME, '25')", | 670 "@SupportedBrowser(SupportedBrowser.CHROME, '25')", |
| 664 "@Experimental()", | 671 "@Experimental()", |
| 665 ], | 672 ], |
| 666 'FileSystem': _file_system_annotations, | 673 'FileSystem': _file_system_annotations, |
| 667 'FileSystemSync': _file_system_annotations, | 674 'FileSystemSync': _file_system_annotations, |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1297 self) | 1304 self) |
| 1298 | 1305 |
| 1299 if type_data.clazz == 'SVGTearOff': | 1306 if type_data.clazz == 'SVGTearOff': |
| 1300 dart_interface_name = self._renamer.RenameInterface( | 1307 dart_interface_name = self._renamer.RenameInterface( |
| 1301 self._database.GetInterface(type_name)) | 1308 self._database.GetInterface(type_name)) |
| 1302 return SVGTearOffIDLTypeInfo( | 1309 return SVGTearOffIDLTypeInfo( |
| 1303 type_name, type_data, dart_interface_name, self) | 1310 type_name, type_data, dart_interface_name, self) |
| 1304 | 1311 |
| 1305 class_name = '%sIDLTypeInfo' % type_data.clazz | 1312 class_name = '%sIDLTypeInfo' % type_data.clazz |
| 1306 return globals()[class_name](type_name, type_data) | 1313 return globals()[class_name](type_name, type_data) |
| OLD | NEW |