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

Side by Side Diff: content/browser/devtools/protocol/devtools_protocol_handler_generator.py

Issue 2035653005: DevTools: split protocol.json into files per domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env 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 import sys 6 import sys
7 import string 7 import string
8 import json 8 import json
9 9
10 blink_protocol_path = sys.argv[1] 10 blink_protocol_path = sys.argv[1]
11 browser_protocol_path = sys.argv[2] 11 browser_protocol_path = sys.argv[2]
12 output_cc_path = sys.argv[3] 12 output_cc_path = sys.argv[3]
13 output_h_path = sys.argv[4] 13 output_h_path = sys.argv[4]
14 14
15 header = """\ 15 header = """\
16 // Copyright 2014 The Chromium Authors. All rights reserved. 16 // Copyright 2014 The Chromium Authors. All rights reserved.
17 // Use of this source code is governed by a BSD-style license that can be 17 // Use of this source code is governed by a BSD-style license that can be
18 // found in the LICENSE file. 18 // found in the LICENSE file.
19 19
20 // THIS FILE IS AUTOGENERATED. DO NOT EDIT. 20 // THIS FILE IS AUTOGENERATED. DO NOT EDIT.
21 // Generated by 21 // Generated by
22 // content/public/browser/devtools_protocol_handler_generator.py from 22 // content/public/browser/devtools_protocol_handler_generator.py from
23 // third_party/WebKit/Source/devtools/protocol.json and 23 // gen/blink/core/inspector/protocol.json and
24 // content/browser/devtools/browser_protocol.json 24 // content/browser/devtools/browser_protocol.json
25 """ 25 """
26 26
27 template_h = string.Template(header + """\ 27 template_h = string.Template(header + """\
28 28
29 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_DISPATCHER_H_ 29 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_DISPATCHER_H_
30 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_DISPATCHER_H_ 30 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_DISPATCHER_H_
31 31
32 #include <utility> 32 #include <utility>
33 33
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 output_h_file.close() 798 output_h_file.close()
799 799
800 output_cc_file.write(template_cc.substitute({}, 800 output_cc_file.write(template_cc.substitute({},
801 major = blink_protocol["version"]["major"], 801 major = blink_protocol["version"]["major"],
802 minor = blink_protocol["version"]["minor"], 802 minor = blink_protocol["version"]["minor"],
803 includes = "".join(sorted(includes)), 803 includes = "".join(sorted(includes)),
804 fields_init = ",\n ".join(fields_init), 804 fields_init = ",\n ".join(fields_init),
805 methods = "\n".join(handler_method_impls), 805 methods = "\n".join(handler_method_impls),
806 types = "\n".join(type_impls))) 806 types = "\n".join(type_impls)))
807 output_cc_file.close() 807 output_cc_file.close()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698