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

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

Issue 2548263002: [DevTools] Migrate dom, emulation, inspector, network, page and schema handlers to new generator. (Closed)
Patch Set: rebased atop of roll Created 4 years 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]
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 else: 636 else:
637 raise Exception("Unknown type at %s.%s %s" % 637 raise Exception("Unknown type at %s.%s %s" %
638 (mapping["Domain"], mapping["command"], mapping["proto_param"])) 638 (mapping["Domain"], mapping["command"], mapping["proto_param"]))
639 639
640 setters = [] 640 setters = []
641 fields = [] 641 fields = []
642 642
643 includes = [] 643 includes = []
644 fields_init = [] 644 fields_init = []
645 645
646 browser_domains_list = ["Inspector", "Page", "Emulation", "Security", 646 browser_domains_list = ["Security",
647 "Target", "ServiceWorker", "Input", "Storage", "Schema"] 647 "Target", "ServiceWorker", "Input", "Storage"]
648 browser_commands_list = [ 648 browser_commands_list = []
649 "DOM.setFileInputFiles",
650 "Network.enable",
651 "Network.disable",
652 "Network.clearBrowserCache",
653 "Network.clearBrowserCookies",
654 "Network.getCookies",
655 "Network.deleteCookie",
656 "Network.setCookie",
657 "Network.canEmulateNetworkConditions",
658 "Network.emulateNetworkConditions"]
659 async_commands_list = [ 649 async_commands_list = [
660 "Page.getResourceContent",
661 "Page.searchInResource",
662 "Page.captureScreenshot",
663 "Network.getCookies",
664 "Network.deleteCookie",
665 "Network.setCookie",
666 "Input.synthesizePinchGesture", 650 "Input.synthesizePinchGesture",
667 "Input.synthesizeScrollGesture", 651 "Input.synthesizeScrollGesture",
668 "Input.synthesizeTapGesture"] 652 "Input.synthesizeTapGesture"]
669 653
670 for json_domain in all_domains: 654 for json_domain in all_domains:
671 domain_map = {} 655 domain_map = {}
672 domain_map["Domain"] = json_domain["domain"] 656 domain_map["Domain"] = json_domain["domain"]
673 domain_map["domain"] = Uncamelcase(json_domain["domain"]) 657 domain_map["domain"] = Uncamelcase(json_domain["domain"])
674 658
675 initializations = [] 659 initializations = []
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 output_h_file.close() 811 output_h_file.close()
828 812
829 output_cc_file.write(template_cc.substitute({}, 813 output_cc_file.write(template_cc.substitute({},
830 major = blink_protocol["version"]["major"], 814 major = blink_protocol["version"]["major"],
831 minor = blink_protocol["version"]["minor"], 815 minor = blink_protocol["version"]["minor"],
832 includes = "".join(sorted(includes)), 816 includes = "".join(sorted(includes)),
833 fields_init = ",\n ".join(fields_init), 817 fields_init = ",\n ".join(fields_init),
834 methods = "\n".join(handler_method_impls), 818 methods = "\n".join(handler_method_impls),
835 types = "\n".join(type_impls))) 819 types = "\n".join(type_impls)))
836 output_cc_file.close() 820 output_cc_file.close()
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/color_picker.cc ('k') | content/browser/devtools/protocol/dom_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698