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

Side by Side Diff: third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_individual.py

Issue 2749253002: bindings: Expand typedefs before generating union files. (Closed)
Patch Set: Created 3 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
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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 extended_attributes = definition.extended_attributes 269 extended_attributes = definition.extended_attributes
270 implemented_as = extended_attributes.get('ImplementedAs') 270 implemented_as = extended_attributes.get('ImplementedAs')
271 full_path = os.path.realpath(idl_filename) 271 full_path = os.path.realpath(idl_filename)
272 this_include_path = include_path(idl_filename, implemented_as) 272 this_include_path = include_path(idl_filename, implemented_as)
273 if definition.is_partial: 273 if definition.is_partial:
274 # We don't create interface_info for partial interfaces, but 274 # We don't create interface_info for partial interfaces, but
275 # adds paths to another dict. 275 # adds paths to another dict.
276 partial_include_paths = [] 276 partial_include_paths = []
277 if this_include_path: 277 if this_include_path:
278 partial_include_paths.append(this_include_path) 278 partial_include_paths.append(this_include_path)
279 for union_type in this_union_types:
280 name = shorten_union_name(union_type)
281 partial_include_paths.append(
282 'bindings/%s/v8/%s.h' % (component, name))
283 self.add_paths_to_partials_dict(definition.name, full_path, partial_ include_paths) 279 self.add_paths_to_partials_dict(definition.name, full_path, partial_ include_paths)
284 # Collects C++ header paths which should be included from generated 280 # Collects C++ header paths which should be included from generated
285 # .cpp files. The resulting structure is as follows. 281 # .cpp files. The resulting structure is as follows.
286 # interfaces_info[interface_name] = { 282 # interfaces_info[interface_name] = {
287 # 'cpp_includes': { 283 # 'cpp_includes': {
288 # 'core': set(['core/foo/Foo.h', ...]), 284 # 'core': set(['core/foo/Foo.h', ...]),
289 # 'modules': set(['modules/bar/Bar.h', ...]), 285 # 'modules': set(['modules/bar/Bar.h', ...]),
290 # }, 286 # },
291 # ... 287 # ...
292 # } 288 # }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 for idl_filename in idl_files: 350 for idl_filename in idl_files:
355 info_collector.collect_info(idl_filename) 351 info_collector.collect_info(idl_filename)
356 352
357 write_pickle_file(options.interfaces_info_file, 353 write_pickle_file(options.interfaces_info_file,
358 info_collector.get_info_as_dict()) 354 info_collector.get_info_as_dict())
359 write_pickle_file(options.component_info_file, 355 write_pickle_file(options.component_info_file,
360 info_collector.get_component_info_as_dict()) 356 info_collector.get_component_info_as_dict())
361 357
362 if __name__ == '__main__': 358 if __name__ == '__main__':
363 sys.exit(main()) 359 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698