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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 No return: modifies dependency_interface in place. | 137 No return: modifies dependency_interface in place. |
138 """ | 138 """ |
139 merged_extended_attributes = dict( | 139 merged_extended_attributes = dict( |
140 (key, value) | 140 (key, value) |
141 for key, value in dependency_interface.extended_attributes.iteritems() | 141 for key, value in dependency_interface.extended_attributes.iteritems() |
142 if key in DEPENDENCY_EXTENDED_ATTRIBUTES) | 142 if key in DEPENDENCY_EXTENDED_ATTRIBUTES) |
143 | 143 |
144 # C++ class name of the implementation, stored in [ImplementedBy], which | 144 # C++ class name of the implementation, stored in [ImplementedBy], which |
145 # defaults to the basename of dependency IDL file. | 145 # defaults to the basename of dependency IDL file. |
146 # This can be overridden by [ImplementedAs] on the dependency interface. | 146 # This can be overridden by [ImplementedAs] on the dependency interface, |
| 147 # and omitted entirely by [ImplementedInBaseClass]. |
147 # Note that [ImplementedAs] is used with different meanings on interfaces | 148 # Note that [ImplementedAs] is used with different meanings on interfaces |
148 # and members: | 149 # and members: |
149 # for Blink class name and function name (or constant name), respectively. | 150 # for Blink class name and function name (or constant name), respectively. |
150 # Thus we do not want to copy this from the interface to the member, but | 151 # Thus we do not want to copy this from the interface to the member, but |
151 # instead extract it and handle it separately. | 152 # instead extract it and handle it separately. |
152 merged_extended_attributes['ImplementedBy'] = ( | 153 if 'ImplementedInBaseClass' not in dependency_interface.extended_attributes: |
153 dependency_interface.extended_attributes.get( | 154 merged_extended_attributes['ImplementedBy'] = ( |
154 'ImplementedAs', dependency_interface_basename)) | 155 dependency_interface.extended_attributes.get( |
| 156 'ImplementedAs', dependency_interface_basename)) |
155 | 157 |
156 for attribute in dependency_interface.attributes: | 158 for attribute in dependency_interface.attributes: |
157 attribute.extended_attributes.update(merged_extended_attributes) | 159 attribute.extended_attributes.update(merged_extended_attributes) |
158 for constant in dependency_interface.constants: | 160 for constant in dependency_interface.constants: |
159 constant.extended_attributes.update(merged_extended_attributes) | 161 constant.extended_attributes.update(merged_extended_attributes) |
160 for operation in dependency_interface.operations: | 162 for operation in dependency_interface.operations: |
161 operation.extended_attributes.update(merged_extended_attributes) | 163 operation.extended_attributes.update(merged_extended_attributes) |
OLD | NEW |