| 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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 = ["Page", "Emulation", "Security", |
| 647 "Target", "ServiceWorker", "Input", "Storage", "Schema"] | 647 "Target", "ServiceWorker", "Input", "Storage", "Schema"] |
| 648 browser_commands_list = [ | 648 browser_commands_list = [ |
| 649 "DOM.setFileInputFiles", | 649 "DOM.setFileInputFiles", |
| 650 "Network.enable", | 650 "Network.enable", |
| 651 "Network.disable", | 651 "Network.disable", |
| 652 "Network.clearBrowserCache", | 652 "Network.clearBrowserCache", |
| 653 "Network.clearBrowserCookies", | 653 "Network.clearBrowserCookies", |
| 654 "Network.getCookies", | 654 "Network.getCookies", |
| 655 "Network.deleteCookie", | 655 "Network.deleteCookie", |
| 656 "Network.setCookie", | 656 "Network.setCookie", |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 output_h_file.close() | 827 output_h_file.close() |
| 828 | 828 |
| 829 output_cc_file.write(template_cc.substitute({}, | 829 output_cc_file.write(template_cc.substitute({}, |
| 830 major = blink_protocol["version"]["major"], | 830 major = blink_protocol["version"]["major"], |
| 831 minor = blink_protocol["version"]["minor"], | 831 minor = blink_protocol["version"]["minor"], |
| 832 includes = "".join(sorted(includes)), | 832 includes = "".join(sorted(includes)), |
| 833 fields_init = ",\n ".join(fields_init), | 833 fields_init = ",\n ".join(fields_init), |
| 834 methods = "\n".join(handler_method_impls), | 834 methods = "\n".join(handler_method_impls), |
| 835 types = "\n".join(type_impls))) | 835 types = "\n".join(type_impls))) |
| 836 output_cc_file.close() | 836 output_cc_file.close() |
| OLD | NEW |