| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 namespace ${domain} { | 200 namespace ${domain} { |
| 201 class ${Domain}Handler; | 201 class ${Domain}Handler; |
| 202 } // namespace domain | 202 } // namespace domain |
| 203 """) | 203 """) |
| 204 | 204 |
| 205 tmpl_client = string.Template("""\ | 205 tmpl_client = string.Template("""\ |
| 206 namespace ${domain} { | 206 namespace ${domain} { |
| 207 class Client : public DevToolsProtocolClient { | 207 class Client : public DevToolsProtocolClient { |
| 208 public: | 208 public: |
| 209 explicit Client(const RawMessageCallback& raw_message_callback); | 209 explicit Client(const RawMessageCallback& raw_message_callback); |
| 210 virtual ~Client(); | 210 ~Client() override; |
| 211 | 211 |
| 212 ${methods}\ | 212 ${methods}\ |
| 213 }; | 213 }; |
| 214 } // namespace ${domain} | 214 } // namespace ${domain} |
| 215 """) | 215 """) |
| 216 | 216 |
| 217 tmpl_event = string.Template("""\ | 217 tmpl_event = string.Template("""\ |
| 218 void ${Command}( | 218 void ${Command}( |
| 219 scoped_refptr<${Command}Params> params); | 219 scoped_refptr<${Command}Params> params); |
| 220 """) | 220 """) |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 output_h_file.close() | 793 output_h_file.close() |
| 794 | 794 |
| 795 output_cc_file.write(template_cc.substitute({}, | 795 output_cc_file.write(template_cc.substitute({}, |
| 796 major = blink_protocol["version"]["major"], | 796 major = blink_protocol["version"]["major"], |
| 797 minor = blink_protocol["version"]["minor"], | 797 minor = blink_protocol["version"]["minor"], |
| 798 includes = "".join(sorted(includes)), | 798 includes = "".join(sorted(includes)), |
| 799 fields_init = ",\n ".join(fields_init), | 799 fields_init = ",\n ".join(fields_init), |
| 800 methods = "\n".join(handler_method_impls), | 800 methods = "\n".join(handler_method_impls), |
| 801 types = "\n".join(type_impls))) | 801 types = "\n".join(type_impls))) |
| 802 output_cc_file.close() | 802 output_cc_file.close() |
| OLD | NEW |