| 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 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 'PluginArray': TypeData(clazz='Interface', item_type='Plugin'), | 1145 'PluginArray': TypeData(clazz='Interface', item_type='Plugin'), |
| 1146 'DOMStringList': TypeData(clazz='Interface', item_type='DOMString', | 1146 'DOMStringList': TypeData(clazz='Interface', item_type='DOMString', |
| 1147 dart_type='List<String>', custom_to_native=True), | 1147 dart_type='List<String>', custom_to_native=True), |
| 1148 'FileList': TypeData(clazz='Interface', item_type='File', | 1148 'FileList': TypeData(clazz='Interface', item_type='File', |
| 1149 dart_type='List<File>'), | 1149 dart_type='List<File>'), |
| 1150 'Future': TypeData(clazz='Interface', dart_type='Future'), | 1150 'Future': TypeData(clazz='Interface', dart_type='Future'), |
| 1151 'GamepadList': TypeData(clazz='Interface', item_type='Gamepad', | 1151 'GamepadList': TypeData(clazz='Interface', item_type='Gamepad', |
| 1152 suppress_interface=True), | 1152 suppress_interface=True), |
| 1153 'GLenum': TypeData(clazz='Primitive', dart_type='int', | 1153 'GLenum': TypeData(clazz='Primitive', dart_type='int', |
| 1154 native_type='unsigned'), | 1154 native_type='unsigned'), |
| 1155 'HTMLCollection': TypeData(clazz='Interface', item_type='Node'), | 1155 'HTMLCollection': TypeData(clazz='Interface', item_type='Node', |
| 1156 dart_type='List<Node>'), |
| 1156 'NamedNodeMap': TypeData(clazz='Interface', item_type='Node'), | 1157 'NamedNodeMap': TypeData(clazz='Interface', item_type='Node'), |
| 1157 'NodeList': TypeData(clazz='Interface', item_type='Node', | 1158 'NodeList': TypeData(clazz='Interface', item_type='Node', |
| 1158 suppress_interface=False, dart_type='List<Node>'), | 1159 suppress_interface=False, dart_type='List<Node>'), |
| 1159 'SVGElementInstanceList': TypeData(clazz='Interface', | 1160 'SVGElementInstanceList': TypeData(clazz='Interface', |
| 1160 item_type='SVGElementInstance', suppress_interface=True), | 1161 item_type='SVGElementInstance', suppress_interface=True), |
| 1161 'SourceBufferList': TypeData(clazz='Interface', item_type='SourceBuffer'), | 1162 'SourceBufferList': TypeData(clazz='Interface', item_type='SourceBuffer'), |
| 1162 'SpeechGrammarList': TypeData(clazz='Interface', item_type='SpeechGrammar'), | 1163 'SpeechGrammarList': TypeData(clazz='Interface', item_type='SpeechGrammar'), |
| 1163 'SpeechInputResultList': TypeData(clazz='Interface', | 1164 'SpeechInputResultList': TypeData(clazz='Interface', |
| 1164 item_type='SpeechInputResult', suppress_interface=True), | 1165 item_type='SpeechInputResult', suppress_interface=True), |
| 1165 'SpeechRecognitionResultList': TypeData(clazz='Interface', | 1166 'SpeechRecognitionResultList': TypeData(clazz='Interface', |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1272 if type_data.clazz == 'BasicTypedList': | 1273 if type_data.clazz == 'BasicTypedList': |
| 1273 if type_name == 'ArrayBuffer': | 1274 if type_name == 'ArrayBuffer': |
| 1274 dart_interface_name = 'ByteBuffer' | 1275 dart_interface_name = 'ByteBuffer' |
| 1275 else: | 1276 else: |
| 1276 dart_interface_name = self._renamer.RenameInterfaceId(type_name) | 1277 dart_interface_name = self._renamer.RenameInterfaceId(type_name) |
| 1277 return BasicTypedListIDLTypeInfo( | 1278 return BasicTypedListIDLTypeInfo( |
| 1278 type_name, type_data, dart_interface_name, self) | 1279 type_name, type_data, dart_interface_name, self) |
| 1279 | 1280 |
| 1280 class_name = '%sIDLTypeInfo' % type_data.clazz | 1281 class_name = '%sIDLTypeInfo' % type_data.clazz |
| 1281 return globals()[class_name](type_name, type_data) | 1282 return globals()[class_name](type_name, type_data) |
| OLD | NEW |