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

Side by Side Diff: Source/bindings/scripts/compute_interfaces_info.py

Issue 205243013: Got WebGLRenderingContextBase to work with the "implements" syntax (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated to use ImplementedInBaseClass (NOT GOOD TO COMMIT) Created 6 years, 9 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 #!/usr/bin/python 1 #!/usr/bin/python
2 # 2 #
3 # Copyright (C) 2013 Google Inc. All rights reserved. 3 # Copyright (C) 2013 Google Inc. All rights reserved.
4 # 4 #
5 # Redistribution and use in source and binary forms, with or without 5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are 6 # modification, are permitted provided that the following conditions are
7 # met: 7 # met:
8 # 8 #
9 # * Redistributions of source code must retain the above copyright 9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer. 10 # notice, this list of conditions and the following disclaimer.
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 157
158 def compute_individual_info(idl_filename): 158 def compute_individual_info(idl_filename):
159 full_path = os.path.realpath(idl_filename) 159 full_path = os.path.realpath(idl_filename)
160 idl_file_contents = get_file_contents(full_path) 160 idl_file_contents = get_file_contents(full_path)
161 161
162 extended_attributes = get_interface_extended_attributes_from_idl(idl_file_co ntents) 162 extended_attributes = get_interface_extended_attributes_from_idl(idl_file_co ntents)
163 implemented_as = extended_attributes.get('ImplementedAs') 163 implemented_as = extended_attributes.get('ImplementedAs')
164 # FIXME: remove [NoHeader] once switch to Python 164 # FIXME: remove [NoHeader] once switch to Python
165 this_include_path = (include_path(idl_filename, implemented_as) 165 this_include_path = (include_path(idl_filename, implemented_as)
166 if ('ImplementedInBaseClass' not in extended_attributes 166 if 'NoHeader' not in extended_attributes
167 and 'NoHeader' not in extended_attributes)
168 else None) 167 else None)
169 168
170 # Handle partial interfaces 169 # Handle partial interfaces
171 partial_interface_name = get_partial_interface_name_from_idl(idl_file_conten ts) 170 partial_interface_name = get_partial_interface_name_from_idl(idl_file_conten ts)
172 if partial_interface_name: 171 if partial_interface_name:
173 add_paths_to_partials_dict(partial_interface_name, full_path, this_inclu de_path) 172 add_paths_to_partials_dict(partial_interface_name, full_path, this_inclu de_path)
174 return 173 return
175 174
176 # If not a partial interface, the basename is the interface name 175 # If not a partial interface, the basename is the interface name
177 interface_name, _ = os.path.splitext(os.path.basename(idl_filename)) 176 interface_name, _ = os.path.splitext(os.path.basename(idl_filename))
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 idl_files.extend(args) 284 idl_files.extend(args)
286 285
287 compute_interfaces_info(idl_files) 286 compute_interfaces_info(idl_files)
288 write_pickle_file(options.interfaces_info_file, 287 write_pickle_file(options.interfaces_info_file,
289 interfaces_info, 288 interfaces_info,
290 options.write_file_only_if_changed) 289 options.write_file_only_if_changed)
291 290
292 291
293 if __name__ == '__main__': 292 if __name__ == '__main__':
294 sys.exit(main()) 293 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698