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

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

Issue 306543008: Qualify include paths in generated bindings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: r-b-t and tests Created 6 years, 7 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 for interface_name, interface_info in interfaces_info.iteritems() 99 for interface_name, interface_info in interfaces_info.iteritems()
100 if interface_info['implemented_as'])) 100 if interface_info['implemented_as']))
101 IdlType.set_garbage_collected_types(set( 101 IdlType.set_garbage_collected_types(set(
102 interface_name 102 interface_name
103 for interface_name, interface_info in interfaces_info.iteritems() 103 for interface_name, interface_info in interfaces_info.iteritems()
104 if 'GarbageCollected' in interface_info['inherited_extended_attribut es'])) 104 if 'GarbageCollected' in interface_info['inherited_extended_attribut es']))
105 IdlType.set_will_be_garbage_collected_types(set( 105 IdlType.set_will_be_garbage_collected_types(set(
106 interface_name 106 interface_name
107 for interface_name, interface_info in interfaces_info.iteritems() 107 for interface_name, interface_info in interfaces_info.iteritems()
108 if 'WillBeGarbageCollected' in interface_info['inherited_extended_at tributes'])) 108 if 'WillBeGarbageCollected' in interface_info['inherited_extended_at tributes']))
109 v8_types.set_component_dirs(dict(
110 (interface_name, interface_info['component_dir'])
111 for interface_name, interface_info in interfaces_info.iteritems()))
109 112
110 def generate_code(self, definitions, interface_name): 113 def generate_code(self, definitions, interface_name):
111 """Returns .h/.cpp code as (header_text, cpp_text).""" 114 """Returns .h/.cpp code as (header_text, cpp_text)."""
112 try: 115 try:
113 interface = definitions.interfaces[interface_name] 116 interface = definitions.interfaces[interface_name]
114 except KeyError: 117 except KeyError:
115 raise Exception('%s not in IDL definitions' % interface_name) 118 raise Exception('%s not in IDL definitions' % interface_name)
116 119
117 # Store other interfaces for introspection 120 # Store other interfaces for introspection
118 interfaces.update(definitions.interfaces) 121 interfaces.update(definitions.interfaces)
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 212
210 # Create a dummy file as output for the build system, 213 # Create a dummy file as output for the build system,
211 # since filenames of individual cache files are unpredictable and opaque 214 # since filenames of individual cache files are unpredictable and opaque
212 # (they are hashes of the template path, which varies based on environment) 215 # (they are hashes of the template path, which varies based on environment)
213 with open(dummy_filename, 'w') as dummy_file: 216 with open(dummy_filename, 'w') as dummy_file:
214 pass # |open| creates or touches the file 217 pass # |open| creates or touches the file
215 218
216 219
217 if __name__ == '__main__': 220 if __name__ == '__main__':
218 sys.exit(main(sys.argv)) 221 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « Source/bindings/modules/generated.gyp ('k') | Source/bindings/scripts/compute_interfaces_info_individual.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698