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

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

Issue 309793002: IDL build: Split global objects computation from global constructors computation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tweak Created 6 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
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 27 matching lines...) Expand all
38 38
39 This list is used in core/ to generate EventFactory and EventNames. 39 This list is used in core/ to generate EventFactory and EventNames.
40 The .in format is documented in build/scripts/in_file.py. 40 The .in format is documented in build/scripts/in_file.py.
41 """ 41 """
42 42
43 from optparse import OptionParser 43 from optparse import OptionParser
44 import os 44 import os
45 import posixpath 45 import posixpath
46 import sys 46 import sys
47 47
48 from utilities import get_file_contents, write_file, get_interface_extended_attr ibutes_from_idl 48 from utilities import get_file_contents, read_file_to_list, write_file, get_inte rface_extended_attributes_from_idl
49 49
50 EXPORTED_EXTENDED_ATTRIBUTES = ( 50 EXPORTED_EXTENDED_ATTRIBUTES = (
51 'Conditional', 51 'Conditional',
52 'ImplementedAs', 52 'ImplementedAs',
53 'RuntimeEnabled', 53 'RuntimeEnabled',
54 ) 54 )
55 module_path = os.path.dirname(os.path.realpath(__file__)) 55 module_path = os.path.dirname(os.path.realpath(__file__))
56 source_dir = os.path.normpath(os.path.join(module_path, os.pardir, os.pardir)) 56 source_dir = os.path.normpath(os.path.join(module_path, os.pardir, os.pardir))
57 57
58 58
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 for event_idl_file in event_idl_files] 104 for event_idl_file in event_idl_files]
105 interface_lines.sort() 105 interface_lines.sort()
106 lines.extend(interface_lines) 106 lines.extend(interface_lines)
107 write_file(''.join(lines), destination_filename, only_if_changed) 107 write_file(''.join(lines), destination_filename, only_if_changed)
108 108
109 109
110 ################################################################################ 110 ################################################################################
111 111
112 def main(): 112 def main():
113 options = parse_options() 113 options = parse_options()
114 with open(options.event_idl_files_list) as event_idl_files_list: 114 event_idl_files = read_file_to_list(options.event_idl_files_list)
115 event_idl_files = [line.rstrip('\n') for line in event_idl_files_list]
116 write_event_interfaces_file(event_idl_files, 115 write_event_interfaces_file(event_idl_files,
117 options.event_interfaces_file, 116 options.event_interfaces_file,
118 options.write_file_only_if_changed, 117 options.write_file_only_if_changed,
119 options.suffix) 118 options.suffix)
120 119
121 120
122 if __name__ == '__main__': 121 if __name__ == '__main__':
123 sys.exit(main()) 122 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698