| 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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 "Network.setCookie", | 656 "Network.setCookie", |
| 657 "Network.canEmulateNetworkConditions", | 657 "Network.canEmulateNetworkConditions", |
| 658 "Network.emulateNetworkConditions"] | 658 "Network.emulateNetworkConditions"] |
| 659 async_commands_list = [ | 659 async_commands_list = [ |
| 660 "Page.getResourceContent", | 660 "Page.getResourceContent", |
| 661 "Page.searchInResource", | 661 "Page.searchInResource", |
| 662 "Page.captureScreenshot", | 662 "Page.captureScreenshot", |
| 663 "Network.getCookies", | 663 "Network.getCookies", |
| 664 "Network.deleteCookie", | 664 "Network.deleteCookie", |
| 665 "Network.setCookie", | 665 "Network.setCookie", |
| 666 "Input.dispatchKeyEvent", | |
| 667 "Input.dispatchMouseEvent", | |
| 668 "Input.synthesizePinchGesture", | 666 "Input.synthesizePinchGesture", |
| 669 "Input.synthesizeScrollGesture", | 667 "Input.synthesizeScrollGesture", |
| 670 "Input.synthesizeTapGesture"] | 668 "Input.synthesizeTapGesture"] |
| 671 | 669 |
| 672 for json_domain in all_domains: | 670 for json_domain in all_domains: |
| 673 domain_map = {} | 671 domain_map = {} |
| 674 domain_map["Domain"] = json_domain["domain"] | 672 domain_map["Domain"] = json_domain["domain"] |
| 675 domain_map["domain"] = Uncamelcase(json_domain["domain"]) | 673 domain_map["domain"] = Uncamelcase(json_domain["domain"]) |
| 676 | 674 |
| 677 initializations = [] | 675 initializations = [] |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 output_h_file.close() | 827 output_h_file.close() |
| 830 | 828 |
| 831 output_cc_file.write(template_cc.substitute({}, | 829 output_cc_file.write(template_cc.substitute({}, |
| 832 major = blink_protocol["version"]["major"], | 830 major = blink_protocol["version"]["major"], |
| 833 minor = blink_protocol["version"]["minor"], | 831 minor = blink_protocol["version"]["minor"], |
| 834 includes = "".join(sorted(includes)), | 832 includes = "".join(sorted(includes)), |
| 835 fields_init = ",\n ".join(fields_init), | 833 fields_init = ",\n ".join(fields_init), |
| 836 methods = "\n".join(handler_method_impls), | 834 methods = "\n".join(handler_method_impls), |
| 837 types = "\n".join(type_impls))) | 835 types = "\n".join(type_impls))) |
| 838 output_cc_file.close() | 836 output_cc_file.close() |
| OLD | NEW |