| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 def IsCustomType(interface_name): | 54 def IsCustomType(interface_name): |
| 55 return interface_name in _custom_types | 55 return interface_name in _custom_types |
| 56 | 56 |
| 57 _methods_with_named_formals = monitored.Set( | 57 _methods_with_named_formals = monitored.Set( |
| 58 'generator._methods_with_named_formals', [ | 58 'generator._methods_with_named_formals', [ |
| 59 'DirectoryEntry.getDirectory', | 59 'DirectoryEntry.getDirectory', |
| 60 'DirectoryEntry.getFile', | 60 'DirectoryEntry.getFile', |
| 61 'Entry.copyTo', | 61 'Entry.copyTo', |
| 62 'Entry.moveTo', | 62 'Entry.moveTo', |
| 63 'HTMLInputElement.setRangeText', | 63 'HTMLInputElement.setRangeText', |
| 64 'HTMLTextAreaElement.setRangeText', |
| 64 'XMLHttpRequest.open', | 65 'XMLHttpRequest.open', |
| 65 ]) | 66 ]) |
| 66 | 67 |
| 67 # | 68 # |
| 68 # Renames for attributes that have names that are not legal Dart names. | 69 # Renames for attributes that have names that are not legal Dart names. |
| 69 # | 70 # |
| 70 _dart_attribute_renames = monitored.Dict('generator._dart_attribute_renames', { | 71 _dart_attribute_renames = monitored.Dict('generator._dart_attribute_renames', { |
| 71 'default': 'defaultValue', | 72 'default': 'defaultValue', |
| 72 }) | 73 }) |
| 73 | 74 |
| (...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 type_name, type_data, dart_interface_name, self) | 1152 type_name, type_data, dart_interface_name, self) |
| 1152 | 1153 |
| 1153 if type_data.clazz == 'BasicTypedList': | 1154 if type_data.clazz == 'BasicTypedList': |
| 1154 dart_interface_name = self._renamer.RenameInterface( | 1155 dart_interface_name = self._renamer.RenameInterface( |
| 1155 self._database.GetInterface(type_name)) | 1156 self._database.GetInterface(type_name)) |
| 1156 return BasicTypedListIDLTypeInfo( | 1157 return BasicTypedListIDLTypeInfo( |
| 1157 type_name, type_data, dart_interface_name, self) | 1158 type_name, type_data, dart_interface_name, self) |
| 1158 | 1159 |
| 1159 class_name = '%sIDLTypeInfo' % type_data.clazz | 1160 class_name = '%sIDLTypeInfo' % type_data.clazz |
| 1160 return globals()[class_name](type_name, type_data) | 1161 return globals()[class_name](type_name, type_data) |
| OLD | NEW |