| 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 json | 10 import json |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 "@Experimental", | 703 "@Experimental", |
| 704 ] | 704 ] |
| 705 | 705 |
| 706 # Annotations to be placed on generated members. | 706 # Annotations to be placed on generated members. |
| 707 # The table is indexed as: | 707 # The table is indexed as: |
| 708 # INTERFACE: annotations to be added to the interface declaration | 708 # INTERFACE: annotations to be added to the interface declaration |
| 709 # INTERFACE.MEMBER: annotation to be added to the member declaration | 709 # INTERFACE.MEMBER: annotation to be added to the member declaration |
| 710 dart_annotations = monitored.Dict('generator.dart_annotations', { | 710 dart_annotations = monitored.Dict('generator.dart_annotations', { |
| 711 'ArrayBuffer': _all_but_ie9_annotations, | 711 'ArrayBuffer': _all_but_ie9_annotations, |
| 712 'ArrayBufferView': _all_but_ie9_annotations, | 712 'ArrayBufferView': _all_but_ie9_annotations, |
| 713 'Crypto': _webkit_experimental_annotations, |
| 713 'Database': _web_sql_annotations, | 714 'Database': _web_sql_annotations, |
| 714 'DatabaseSync': _web_sql_annotations, | 715 'DatabaseSync': _web_sql_annotations, |
| 715 'DOMApplicationCache': [ | 716 'DOMApplicationCache': [ |
| 716 "@SupportedBrowser(SupportedBrowser.CHROME)", | 717 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 717 "@SupportedBrowser(SupportedBrowser.FIREFOX)", | 718 "@SupportedBrowser(SupportedBrowser.FIREFOX)", |
| 718 "@SupportedBrowser(SupportedBrowser.IE, '10')", | 719 "@SupportedBrowser(SupportedBrowser.IE, '10')", |
| 719 "@SupportedBrowser(SupportedBrowser.OPERA)", | 720 "@SupportedBrowser(SupportedBrowser.OPERA)", |
| 720 "@SupportedBrowser(SupportedBrowser.SAFARI)", | 721 "@SupportedBrowser(SupportedBrowser.SAFARI)", |
| 721 ], | 722 ], |
| 722 'DOMFileSystem': _file_system_annotations, | 723 'DOMFileSystem': _file_system_annotations, |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1477 self) | 1478 self) |
| 1478 | 1479 |
| 1479 if type_data.clazz == 'SVGTearOff': | 1480 if type_data.clazz == 'SVGTearOff': |
| 1480 dart_interface_name = self._renamer.RenameInterface( | 1481 dart_interface_name = self._renamer.RenameInterface( |
| 1481 self._database.GetInterface(type_name)) | 1482 self._database.GetInterface(type_name)) |
| 1482 return SVGTearOffIDLTypeInfo( | 1483 return SVGTearOffIDLTypeInfo( |
| 1483 type_name, type_data, dart_interface_name, self) | 1484 type_name, type_data, dart_interface_name, self) |
| 1484 | 1485 |
| 1485 class_name = '%sIDLTypeInfo' % type_data.clazz | 1486 class_name = '%sIDLTypeInfo' % type_data.clazz |
| 1486 return globals()[class_name](type_name, type_data) | 1487 return globals()[class_name](type_name, type_data) |
| OLD | NEW |