Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 the main IdlInterface, as these are only referenced (their members are | 75 the main IdlInterface, as these are only referenced (their members are |
| 76 introspected, but not implemented in this interface). | 76 introspected, but not implemented in this interface). |
| 77 | 77 |
| 78 Inherited extended attributes are also added to the main IdlInterface. | 78 Inherited extended attributes are also added to the main IdlInterface. |
| 79 | 79 |
| 80 Modifies definitions in place by adding parsed dependencies. | 80 Modifies definitions in place by adding parsed dependencies. |
| 81 | 81 |
| 82 Args: | 82 Args: |
| 83 definitions: IdlDefinitions object, modified in place | 83 definitions: IdlDefinitions object, modified in place |
| 84 """ | 84 """ |
| 85 if len(definitions.interfaces) == 0: | |
|
Nils Barth (inactive)
2014/07/18 21:52:34
if not definitions.interfaces:
(implicit false)
ht
bashi
2014/07/22 02:33:57
Done.
| |
| 86 # Definitions should have a dictionary and nothing to do for it. | |
| 87 return | |
| 85 target_interface = next(definitions.interfaces.itervalues()) | 88 target_interface = next(definitions.interfaces.itervalues()) |
| 89 | |
| 86 interface_name = target_interface.name | 90 interface_name = target_interface.name |
| 87 interface_info = self.interfaces_info[interface_name] | 91 interface_info = self.interfaces_info[interface_name] |
| 88 | 92 |
| 89 if 'inherited_extended_attributes' in interface_info: | 93 if 'inherited_extended_attributes' in interface_info: |
| 90 target_interface.extended_attributes.update( | 94 target_interface.extended_attributes.update( |
| 91 interface_info['inherited_extended_attributes']) | 95 interface_info['inherited_extended_attributes']) |
| 92 | 96 |
| 93 merge_interface_dependencies(definitions, | 97 merge_interface_dependencies(definitions, |
| 94 target_interface, | 98 target_interface, |
| 95 interface_info['dependencies_full_paths'], | 99 interface_info['dependencies_full_paths'], |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 merged_extended_attributes['PartialInterfaceImplementedAs'] = ( | 174 merged_extended_attributes['PartialInterfaceImplementedAs'] = ( |
| 171 dependency_interface.extended_attributes.get( | 175 dependency_interface.extended_attributes.get( |
| 172 'ImplementedAs', dependency_interface_basename)) | 176 'ImplementedAs', dependency_interface_basename)) |
| 173 | 177 |
| 174 for attribute in dependency_interface.attributes: | 178 for attribute in dependency_interface.attributes: |
| 175 attribute.extended_attributes.update(merged_extended_attributes) | 179 attribute.extended_attributes.update(merged_extended_attributes) |
| 176 for constant in dependency_interface.constants: | 180 for constant in dependency_interface.constants: |
| 177 constant.extended_attributes.update(merged_extended_attributes) | 181 constant.extended_attributes.update(merged_extended_attributes) |
| 178 for operation in dependency_interface.operations: | 182 for operation in dependency_interface.operations: |
| 179 operation.extended_attributes.update(merged_extended_attributes) | 183 operation.extended_attributes.update(merged_extended_attributes) |
| OLD | NEW |