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

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

Issue 17648006: Rename WorkerContext to WorkerGlobalScope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 6 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
« no previous file with comments | « Source/bindings/scripts/CodeGeneratorV8.pm ('k') | Source/bindings/v8/ActiveDOMCallback.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 window_constructor_attributes_list.extend(constructor_list) 181 window_constructor_attributes_list.extend(constructor_list)
182 if global_context != "WindowOnly": 182 if global_context != "WindowOnly":
183 workercontext_constructor_attributes_list.extend(constructor _list) 183 workercontext_constructor_attributes_list.extend(constructor _list)
184 idl_file_to_interface_name[full_path] = interface_name 184 idl_file_to_interface_name[full_path] = interface_name
185 supplementals[full_path] = [] 185 supplementals[full_path] = []
186 186
187 # Generate Global constructors 187 # Generate Global constructors
188 generate_global_constructors_partial_interface("Window", window_constructors _filename, window_constructor_attributes_list) 188 generate_global_constructors_partial_interface("Window", window_constructors _filename, window_constructor_attributes_list)
189 if 'Window' in interface_name_to_idl_file: 189 if 'Window' in interface_name_to_idl_file:
190 supplemental_dependencies[window_constructors_filename] = ['Window'] 190 supplemental_dependencies[window_constructors_filename] = ['Window']
191 generate_global_constructors_partial_interface("WorkerContext", workercontex t_constructors_filename, workercontext_constructor_attributes_list) 191 generate_global_constructors_partial_interface("WorkerGlobalScope", workerco ntext_constructors_filename, workercontext_constructor_attributes_list)
192 if 'WorkerContext' in interface_name_to_idl_file: 192 if 'WorkerGlobalScope' in interface_name_to_idl_file:
193 supplemental_dependencies[workercontext_constructors_filename] = ['Worke rContext'] 193 supplemental_dependencies[workercontext_constructors_filename] = ['Worke rGlobalScope']
194 194
195 # Resolve partial interfaces dependencies 195 # Resolve partial interfaces dependencies
196 for idl_file, base_files in supplemental_dependencies.iteritems(): 196 for idl_file, base_files in supplemental_dependencies.iteritems():
197 for base_file in base_files: 197 for base_file in base_files:
198 target_idl_file = interface_name_to_idl_file[base_file] 198 target_idl_file = interface_name_to_idl_file[base_file]
199 supplementals[target_idl_file].append(idl_file) 199 supplementals[target_idl_file].append(idl_file)
200 if idl_file in supplementals: 200 if idl_file in supplementals:
201 # Should never occur. Might be needed in corner cases. 201 # Should never occur. Might be needed in corner cases.
202 del supplementals[idl_file] 202 del supplementals[idl_file]
203 return supplementals 203 return supplementals
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 idl_files = [] 238 idl_files = []
239 with open(options.idl_files_list) as idl_files_list_file: 239 with open(options.idl_files_list) as idl_files_list_file:
240 for line in idl_files_list_file: 240 for line in idl_files_list_file:
241 idl_files.append(string.rstrip(line, '\n')) 241 idl_files.append(string.rstrip(line, '\n'))
242 resolved_supplementals = parse_idl_files(idl_files, options.window_construct ors_file, options.workercontext_constructors_file) 242 resolved_supplementals = parse_idl_files(idl_files, options.window_construct ors_file, options.workercontext_constructors_file)
243 write_dependency_file(options.supplemental_dependency_file, resolved_supplem entals, only_if_changed=options.write_file_only_if_changed) 243 write_dependency_file(options.supplemental_dependency_file, resolved_supplem entals, only_if_changed=options.write_file_only_if_changed)
244 244
245 245
246 if __name__ == '__main__': 246 if __name__ == '__main__':
247 main() 247 main()
OLDNEW
« no previous file with comments | « Source/bindings/scripts/CodeGeneratorV8.pm ('k') | Source/bindings/v8/ActiveDOMCallback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698