| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 Google Inc. All rights reserved. | 2 # Copyright (c) 2011 Google Inc. All rights reserved. |
| 3 # Copyright (c) 2012 Intel Corporation. All rights reserved. | 3 # Copyright (c) 2012 Intel Corporation. All rights reserved. |
| 4 # | 4 # |
| 5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
| 6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
| 7 # met: | 7 # met: |
| 8 # | 8 # |
| 9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
| 10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 js_reply_list = "[%s]" % ", ".join(backend_js_reply_param_list) | 270 js_reply_list = "[%s]" % ", ".join(backend_js_reply_param_list) |
| 271 if "error" in json_command: | 271 if "error" in json_command: |
| 272 has_error_data_param = "true" | 272 has_error_data_param = "true" |
| 273 else: | 273 else: |
| 274 has_error_data_param = "false" | 274 has_error_data_param = "false" |
| 275 | 275 |
| 276 Generator.backend_js_domain_initializer_list.append("InspectorBackend.re
gisterCommand(\"%s.%s\", [%s], %s, %s);\n" % (domain_name, json_command_name, js
_parameters_text, js_reply_list, has_error_data_param)) | 276 Generator.backend_js_domain_initializer_list.append("InspectorBackend.re
gisterCommand(\"%s.%s\", [%s], %s, %s);\n" % (domain_name, json_command_name, js
_parameters_text, js_reply_list, has_error_data_param)) |
| 277 | 277 |
| 278 Generator.go() | 278 Generator.go() |
| 279 | 279 |
| 280 backend_js_file = open(output_js_dirname + "/InspectorBackendCommands.js", "w") | 280 backend_js_file = open(output_js_dirname + "/gen/InspectorBackendCommands.js", "
w") |
| 281 | 281 |
| 282 backend_js_file.write(Templates.backend_js.substitute(None, | 282 backend_js_file.write(Templates.backend_js.substitute(None, |
| 283 domainInitializers="".join(Generator.backend_js_domain_initializer_list))) | 283 domainInitializers="".join(Generator.backend_js_domain_initializer_list))) |
| 284 | 284 |
| 285 backend_js_file.close() | 285 backend_js_file.close() |
| OLD | NEW |