Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 'NoHeader' not in extended_attributes else None) | 166 if ('ImplementedInBaseClass' not in extended_attributes |
| 167 and 'NoHeader' not in extended_attributes) | |
|
haraken
2014/03/24 05:51:32
Can you remove NoHeader in the near future?
Nils Barth (inactive)
2014/03/24 06:19:45
Yes; will do in separate CL to keep this one simpl
| |
| 168 else None) | |
| 167 | 169 |
| 168 # Handle partial interfaces | 170 # Handle partial interfaces |
| 169 partial_interface_name = get_partial_interface_name_from_idl(idl_file_conten ts) | 171 partial_interface_name = get_partial_interface_name_from_idl(idl_file_conten ts) |
| 170 if partial_interface_name: | 172 if partial_interface_name: |
| 171 add_paths_to_partials_dict(partial_interface_name, full_path, this_inclu de_path) | 173 add_paths_to_partials_dict(partial_interface_name, full_path, this_inclu de_path) |
| 172 return | 174 return |
| 173 | 175 |
| 174 # If not a partial interface, the basename is the interface name | 176 # If not a partial interface, the basename is the interface name |
| 175 interface_name, _ = os.path.splitext(os.path.basename(idl_filename)) | 177 interface_name, _ = os.path.splitext(os.path.basename(idl_filename)) |
| 176 | 178 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 283 idl_files.extend(args) | 285 idl_files.extend(args) |
| 284 | 286 |
| 285 compute_interfaces_info(idl_files) | 287 compute_interfaces_info(idl_files) |
| 286 write_pickle_file(options.interfaces_info_file, | 288 write_pickle_file(options.interfaces_info_file, |
| 287 interfaces_info, | 289 interfaces_info, |
| 288 options.write_file_only_if_changed) | 290 options.write_file_only_if_changed) |
| 289 | 291 |
| 290 | 292 |
| 291 if __name__ == '__main__': | 293 if __name__ == '__main__': |
| 292 sys.exit(main()) | 294 sys.exit(main()) |
| OLD | NEW |