| OLD | NEW |
| 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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", "Memory", "Page", "Emulation", "Security", | 646 browser_domains_list = ["Inspector", "Memory", "Page", "Emulation", "Security", |
| 647 "IO", "Target", "ServiceWorker", "Input", "Tracing", "Storage", | 647 "Target", "ServiceWorker", "Input", "Storage", |
| 648 "SystemInfo", "Tethering", "Schema"] | 648 "SystemInfo", "Tethering", "Schema"] |
| 649 browser_commands_list = [ | 649 browser_commands_list = [ |
| 650 "DOM.setFileInputFiles", | 650 "DOM.setFileInputFiles", |
| 651 "Network.enable", | 651 "Network.enable", |
| 652 "Network.disable", | 652 "Network.disable", |
| 653 "Network.clearBrowserCache", | 653 "Network.clearBrowserCache", |
| 654 "Network.clearBrowserCookies", | 654 "Network.clearBrowserCookies", |
| 655 "Network.getCookies", | 655 "Network.getCookies", |
| 656 "Network.deleteCookie", | 656 "Network.deleteCookie", |
| 657 "Network.setCookie", | 657 "Network.setCookie", |
| 658 "Network.canEmulateNetworkConditions", | 658 "Network.canEmulateNetworkConditions", |
| 659 "Network.emulateNetworkConditions"] | 659 "Network.emulateNetworkConditions"] |
| 660 async_commands_list = [ | 660 async_commands_list = [ |
| 661 "Page.getResourceContent", | 661 "Page.getResourceContent", |
| 662 "Page.searchInResource", | 662 "Page.searchInResource", |
| 663 "Page.captureScreenshot", | 663 "Page.captureScreenshot", |
| 664 "Network.getCookies", | 664 "Network.getCookies", |
| 665 "Network.deleteCookie", | 665 "Network.deleteCookie", |
| 666 "Network.setCookie", | 666 "Network.setCookie", |
| 667 "IO.read", | |
| 668 "Input.synthesizePinchGesture", | 667 "Input.synthesizePinchGesture", |
| 669 "Input.synthesizeScrollGesture", | 668 "Input.synthesizeScrollGesture", |
| 670 "Input.synthesizeTapGesture", | 669 "Input.synthesizeTapGesture", |
| 671 "Tracing.start", | |
| 672 "Tracing.end", | |
| 673 "Tracing.getCategories", | |
| 674 "Tracing.requestMemoryDump", | |
| 675 "SystemInfo.getInfo", | 670 "SystemInfo.getInfo", |
| 676 "Tethering.bind", | 671 "Tethering.bind", |
| 677 "Tethering.unbind"] | 672 "Tethering.unbind"] |
| 678 | 673 |
| 679 for json_domain in all_domains: | 674 for json_domain in all_domains: |
| 680 domain_map = {} | 675 domain_map = {} |
| 681 domain_map["Domain"] = json_domain["domain"] | 676 domain_map["Domain"] = json_domain["domain"] |
| 682 domain_map["domain"] = Uncamelcase(json_domain["domain"]) | 677 domain_map["domain"] = Uncamelcase(json_domain["domain"]) |
| 683 | 678 |
| 684 initializations = [] | 679 initializations = [] |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 output_h_file.close() | 831 output_h_file.close() |
| 837 | 832 |
| 838 output_cc_file.write(template_cc.substitute({}, | 833 output_cc_file.write(template_cc.substitute({}, |
| 839 major = blink_protocol["version"]["major"], | 834 major = blink_protocol["version"]["major"], |
| 840 minor = blink_protocol["version"]["minor"], | 835 minor = blink_protocol["version"]["minor"], |
| 841 includes = "".join(sorted(includes)), | 836 includes = "".join(sorted(includes)), |
| 842 fields_init = ",\n ".join(fields_init), | 837 fields_init = ",\n ".join(fields_init), |
| 843 methods = "\n".join(handler_method_impls), | 838 methods = "\n".join(handler_method_impls), |
| 844 types = "\n".join(type_impls))) | 839 types = "\n".join(type_impls))) |
| 845 output_cc_file.close() | 840 output_cc_file.close() |
| OLD | NEW |