Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: Source/bindings/scripts/unstable/interface_dependency_resolver.py

Issue 166903007: IDL compiler: omit header for WindowMediaSource.idl in Python (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove test case Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if key in DEPENDENCY_EXTENDED_ATTRIBUTES) 158 if key in DEPENDENCY_EXTENDED_ATTRIBUTES)
159 159
160 # C++ class name of the implementation, stored in [ImplementedBy], which 160 # C++ class name of the implementation, stored in [ImplementedBy], which
161 # defaults to the basename of dependency IDL file. 161 # defaults to the basename of dependency IDL file.
162 # This can be overridden by [ImplementedAs] on the dependency interface. 162 # This can be overridden by [ImplementedAs] on the dependency interface.
163 # Note that [ImplementedAs] is used with different meanings on interfaces 163 # Note that [ImplementedAs] is used with different meanings on interfaces
164 # and members: 164 # and members:
165 # for Blink class name and function name (or constant name), respectively. 165 # for Blink class name and function name (or constant name), respectively.
166 # Thus we do not want to copy this from the interface to the member, but 166 # Thus we do not want to copy this from the interface to the member, but
167 # instead extract it and handle it separately. 167 # instead extract it and handle it separately.
168 implemented_by = dependency_interface.extended_attributes.get('ImplementedAs ', dependency_interface_basename) 168 merged_extended_attributes['ImplementedBy'] = (
169 dependency_interface.extended_attributes.get(
170 'ImplementedAs', dependency_interface_basename))
169 171
170 def merge_lists(source_list, target_list): 172 def merge_lists(source_list, target_list):
171 for member in source_list: 173 for member in source_list:
172 member.extended_attributes.update(merged_extended_attributes) 174 member.extended_attributes.update(merged_extended_attributes)
173 member.extended_attributes['ImplementedBy'] = implemented_by 175 target_list.extend(source_list)
174 target_list.append(member)
175 176
176 merge_lists(dependency_interface.attributes, target_interface.attributes) 177 merge_lists(dependency_interface.attributes, target_interface.attributes)
177 merge_lists(dependency_interface.constants, target_interface.constants) 178 merge_lists(dependency_interface.constants, target_interface.constants)
178 merge_lists(dependency_interface.operations, target_interface.operations) 179 merge_lists(dependency_interface.operations, target_interface.operations)
OLDNEW
« no previous file with comments | « Source/bindings/scripts/compute_dependencies.py ('k') | Source/bindings/tests/idls/TestImplements3.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698