| 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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 if IsPureInterface(self.idl_type()): | 694 if IsPureInterface(self.idl_type()): |
| 695 return self.idl_type() | 695 return self.idl_type() |
| 696 return self.interface_name() | 696 return self.interface_name() |
| 697 | 697 |
| 698 def interface_name(self): | 698 def interface_name(self): |
| 699 return self._dart_interface_name | 699 return self._dart_interface_name |
| 700 | 700 |
| 701 def implementation_name(self): | 701 def implementation_name(self): |
| 702 implementation_name = self._dart_interface_name | 702 implementation_name = self._dart_interface_name |
| 703 if self.merged_into(): | 703 if self.merged_into(): |
| 704 implementation_name = '_%s_Merged' % implementation_name | 704 return '_%s' % self.idl_type() |
| 705 | 705 |
| 706 if not self.has_generated_interface(): | 706 if not self.has_generated_interface(): |
| 707 implementation_name = '_%s' % implementation_name | 707 implementation_name = '_%s' % implementation_name |
| 708 | 708 |
| 709 return implementation_name | 709 return implementation_name |
| 710 | 710 |
| 711 def native_type(self): | 711 def native_type(self): |
| 712 database = self._type_registry._database | 712 database = self._type_registry._database |
| 713 if database.HasInterface(self.idl_type()): | 713 if database.HasInterface(self.idl_type()): |
| 714 interface = database.GetInterface(self.idl_type()) | 714 interface = database.GetInterface(self.idl_type()) |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1143 type_name, type_data, dart_interface_name, self) | 1143 type_name, type_data, dart_interface_name, self) |
| 1144 | 1144 |
| 1145 if type_data.clazz == 'BasicTypedList': | 1145 if type_data.clazz == 'BasicTypedList': |
| 1146 dart_interface_name = self._renamer.RenameInterface( | 1146 dart_interface_name = self._renamer.RenameInterface( |
| 1147 self._database.GetInterface(type_name)) | 1147 self._database.GetInterface(type_name)) |
| 1148 return BasicTypedListIDLTypeInfo( | 1148 return BasicTypedListIDLTypeInfo( |
| 1149 type_name, type_data, dart_interface_name, self) | 1149 type_name, type_data, dart_interface_name, self) |
| 1150 | 1150 |
| 1151 class_name = '%sIDLTypeInfo' % type_data.clazz | 1151 class_name = '%sIDLTypeInfo' % type_data.clazz |
| 1152 return globals()[class_name](type_name, type_data) | 1152 return globals()[class_name](type_name, type_data) |
| OLD | NEW |