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

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

Issue 2435973003: [Bindings][Refactoring] Make binding scripts use utilities to handle pickle files (Closed)
Patch Set: Created 4 years, 2 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 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Generate initPartialInterfacesInModules(), which registers partial interfaces in modules to core interfaces.""" 6 """Generate initPartialInterfacesInModules(), which registers partial interfaces in modules to core interfaces."""
7 7
8 import cPickle as pickle 8 # pylint: disable=relative-import
9
9 from optparse import OptionParser 10 from optparse import OptionParser
10 import os 11 import os
11 import posixpath 12 import posixpath
12 import sys 13 import sys
14
13 from utilities import get_file_contents 15 from utilities import get_file_contents
14 from utilities import idl_filename_to_interface_name 16 from utilities import idl_filename_to_interface_name
15 from utilities import read_idl_files_list_from_file 17 from utilities import read_idl_files_list_from_file
16 from utilities import should_generate_impl_file_from_idl 18 from utilities import should_generate_impl_file_from_idl
17 from utilities import write_file 19 from utilities import write_file
18 20
19 21
20 _COPYRIGHT = """// Copyright 2014 The Chromium Authors. All rights reserved. 22 _COPYRIGHT = """// Copyright 2014 The Chromium Authors. All rights reserved.
21 // Use of this source code is governed by a BSD-style license that can be 23 // Use of this source code is governed by a BSD-style license that can be
22 // found in the LICENSE file. 24 // found in the LICENSE file.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 content = _INIT_PARTIAL_INTERFACE % ( 99 content = _INIT_PARTIAL_INTERFACE % (
98 _COPYRIGHT, 100 _COPYRIGHT,
99 '\n'.join(includes), 101 '\n'.join(includes),
100 '\n'.join(initialize_calls)) 102 '\n'.join(initialize_calls))
101 103
102 write_file(content, options.output) 104 write_file(content, options.output)
103 105
104 106
105 if __name__ == '__main__': 107 if __name__ == '__main__':
106 sys.exit(main()) 108 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698