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

Side by Side Diff: third_party/WebKit/Source/devtools/scripts/build/generate_devtools_grd.py

Issue 2867073006: Adds a /json/protocol endpoint to serve the DevTools protocol (Closed)
Patch Set: try a different dependancy Created 3 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
« no previous file with comments | « content/browser/devtools/devtools_http_handler.cc ('k') | no next file » | 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/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (C) 2011 Google Inc. All rights reserved. 3 # Copyright (C) 2011 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 <outputs> 46 <outputs>
47 <output filename="grit/devtools_resources.h" type="rc_header"> 47 <output filename="grit/devtools_resources.h" type="rc_header">
48 <emit emit_type='prepend'></emit> 48 <emit emit_type='prepend'></emit>
49 </output> 49 </output>
50 <output filename="grit/devtools_resources_map.cc" type="resource_file_map_so urce" /> 50 <output filename="grit/devtools_resources_map.cc" type="resource_file_map_so urce" />
51 <output filename="grit/devtools_resources_map.h" type="resource_map_header" /> 51 <output filename="grit/devtools_resources_map.h" type="resource_map_header" />
52 52
53 <output filename="devtools_resources.pak" type="data_package" /> 53 <output filename="devtools_resources.pak" type="data_package" />
54 </outputs> 54 </outputs>
55 <release seq="1"> 55 <release seq="1">
56 <includes></includes> 56 <includes>
57 <include name="COMPRESSED_PROTOCOL_JSON" file="${compressed_protocol_file} " use_base_dir="false" type="BINDATA" />
pfeldman 2017/05/10 20:48:59 Is brotli that much better than 7z?
58 </includes>
57 </release> 59 </release>
58 </grit> 60 </grit>
59 ''' 61 '''
60 62
61 63
62 class ParsedArgs: 64 class ParsedArgs:
63 65
64 def __init__(self, source_files, relative_path_dirs, image_dirs, output_file name): 66 def __init__(self, source_files, relative_path_dirs, image_dirs, output_file name):
65 self.source_files = source_files 67 self.source_files = source_files
66 self.relative_path_dirs = relative_path_dirs 68 self.relative_path_dirs = relative_path_dirs
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 continue 160 continue
159 shutil.copy(path.join(dirname, filename), path.join(output_directory , 'Images')) 161 shutil.copy(path.join(dirname, filename), path.join(output_directory , 'Images'))
160 add_file_to_grd(doc, path.join('Images', filename)) 162 add_file_to_grd(doc, path.join('Images', filename))
161 163
162 with open(parsed_args.output_filename, 'w') as output_file: 164 with open(parsed_args.output_filename, 'w') as output_file:
163 output_file.write(doc.toxml(encoding='UTF-8')) 165 output_file.write(doc.toxml(encoding='UTF-8'))
164 166
165 167
166 if __name__ == '__main__': 168 if __name__ == '__main__':
167 sys.exit(main(sys.argv)) 169 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_http_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698