| 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 generates Dart APIs from the IDL database.""" | 6 """This module generates Dart APIs from the IDL database.""" |
| 7 | 7 |
| 8 import emitter | 8 import emitter |
| 9 import idlnode | 9 import idlnode |
| 10 import logging | 10 import logging |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 interface.constants = filter(HasAnnotations, interface.constants) | 177 interface.constants = filter(HasAnnotations, interface.constants) |
| 178 interface.attributes = filter(HasAnnotations, interface.attributes) | 178 interface.attributes = filter(HasAnnotations, interface.attributes) |
| 179 interface.operations = filter(HasAnnotations, interface.operations) | 179 interface.operations = filter(HasAnnotations, interface.operations) |
| 180 interface.parents = filter(HasAnnotations, interface.parents) | 180 interface.parents = filter(HasAnnotations, interface.parents) |
| 181 else: | 181 else: |
| 182 database.DeleteInterface(interface.id) | 182 database.DeleteInterface(interface.id) |
| 183 | 183 |
| 184 self.FilterMembersWithUnidentifiedTypes(database) | 184 self.FilterMembersWithUnidentifiedTypes(database) |
| 185 | 185 |
| 186 def Generate(self, database, system, source_filter=None, super_database=None, | 186 def Generate(self, database, system, source_filter=None, super_database=None, |
| 187 common_prefix=None, webkit_renames={}, html_renames={}): | 187 common_prefix=None, webkit_renames={}): |
| 188 self._database = database | 188 self._database = database |
| 189 | 189 |
| 190 # Collect interfaces | 190 # Collect interfaces |
| 191 interfaces = [] | 191 interfaces = [] |
| 192 for interface in database.GetInterfaces(): | 192 for interface in database.GetInterfaces(): |
| 193 if not MatchSourceFilter(source_filter, interface): | 193 if not MatchSourceFilter(source_filter, interface): |
| 194 # Skip this interface since it's not present in the required source | 194 # Skip this interface since it's not present in the required source |
| 195 _logger.info('Omitting interface - %s' % interface.id) | 195 _logger.info('Omitting interface - %s' % interface.id) |
| 196 continue | 196 continue |
| 197 interfaces.append(interface) | 197 interfaces.append(interface) |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 PARAMETERS=constructor_info.ParametersImplementationDeclaration()) | 388 PARAMETERS=constructor_info.ParametersImplementationDeclaration()) |
| 389 | 389 |
| 390 def FinishInterface(self): | 390 def FinishInterface(self): |
| 391 pass | 391 pass |
| 392 | 392 |
| 393 def AddTypedArrayConstructors(self, element_type): | 393 def AddTypedArrayConstructors(self, element_type): |
| 394 pass | 394 pass |
| 395 | 395 |
| 396 def AddEventAttributes(self, event_attrs): | 396 def AddEventAttributes(self, event_attrs): |
| 397 pass | 397 pass |
| OLD | NEW |