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

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

Issue 189543008: Factor abstract base class IDLCompiler, concrete class IDLComplierV8 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: get_file_contents() 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
« no previous file with comments | « no previous file | Source/bindings/scripts/generate_global_constructors.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 return '%s %s\n' % (relative_path_posix, 106 return '%s %s\n' % (relative_path_posix,
107 ', '.join(extended_attributes_list)) 107 ', '.join(extended_attributes_list))
108 108
109 lines = ['namespace="Event"\n', 109 lines = ['namespace="Event"\n',
110 '\n'] 110 '\n']
111 interface_lines = [interface_line(interface_name) 111 interface_lines = [interface_line(interface_name)
112 for interface_name in event_interfaces] 112 for interface_name in event_interfaces]
113 interface_lines.sort() 113 interface_lines.sort()
114 lines.extend(interface_lines) 114 lines.extend(interface_lines)
115 write_file(lines, destination_filename, only_if_changed) 115 write_file(''.join(lines), destination_filename, only_if_changed)
116 116
117 117
118 ################################################################################ 118 ################################################################################
119 119
120 def main(): 120 def main():
121 options = parse_options() 121 options = parse_options()
122 with open(options.interfaces_info_file) as interfaces_info_file: 122 with open(options.interfaces_info_file) as interfaces_info_file:
123 interfaces_info = pickle.load(interfaces_info_file) 123 interfaces_info = pickle.load(interfaces_info_file)
124 write_event_interfaces_file(interfaces_info, 124 write_event_interfaces_file(interfaces_info,
125 options.event_interfaces_file, 125 options.event_interfaces_file,
126 options.write_file_only_if_changed) 126 options.write_file_only_if_changed)
127 127
128 128
129 if __name__ == '__main__': 129 if __name__ == '__main__':
130 sys.exit(main()) 130 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/scripts/generate_global_constructors.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698