| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 Google Inc. All rights reserved. | 2 # Copyright (c) 2013 Google Inc. All rights reserved. |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 if (agent->${name}(${params_agent})) | 108 if (agent->${name}(${params_agent})) |
| 109 timelineAgentId = agent->id(); | 109 timelineAgentId = agent->id(); |
| 110 }""") | 110 }""") |
| 111 | 111 |
| 112 | 112 |
| 113 template_instrumenting_agents_h = string.Template("""// Code generated from Insp
ectorInstrumentation.idl | 113 template_instrumenting_agents_h = string.Template("""// Code generated from Insp
ectorInstrumentation.idl |
| 114 | 114 |
| 115 #ifndef InstrumentingAgentsInl_h | 115 #ifndef InstrumentingAgentsInl_h |
| 116 #define InstrumentingAgentsInl_h | 116 #define InstrumentingAgentsInl_h |
| 117 | 117 |
| 118 #include <wtf/FastAllocBase.h> | 118 #include "wtf/FastAllocBase.h" |
| 119 #include <wtf/Noncopyable.h> | 119 #include "wtf/Noncopyable.h" |
| 120 #include <wtf/PassRefPtr.h> | 120 #include "wtf/PassRefPtr.h" |
| 121 #include <wtf/RefCounted.h> | 121 #include "wtf/RefCounted.h" |
| 122 | 122 |
| 123 namespace WebCore { | 123 namespace WebCore { |
| 124 | 124 |
| 125 ${forward_list} | 125 ${forward_list} |
| 126 | 126 |
| 127 class InstrumentingAgents : public RefCounted<InstrumentingAgents> { | 127 class InstrumentingAgents : public RefCounted<InstrumentingAgents> { |
| 128 WTF_MAKE_NONCOPYABLE(InstrumentingAgents); | 128 WTF_MAKE_NONCOPYABLE(InstrumentingAgents); |
| 129 WTF_MAKE_FAST_ALLOCATED; | 129 WTF_MAKE_FAST_ALLOCATED; |
| 130 public: | 130 public: |
| 131 static PassRefPtr<InstrumentingAgents> create() | 131 static PassRefPtr<InstrumentingAgents> create() |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 if not output_dirpath: | 515 if not output_dirpath: |
| 516 raise Exception("Output directory must be specified") | 516 raise Exception("Output directory must be specified") |
| 517 except Exception: | 517 except Exception: |
| 518 # Work with python 2 and 3 http://docs.python.org/py3k/howto/pyporting.html | 518 # Work with python 2 and 3 http://docs.python.org/py3k/howto/pyporting.html |
| 519 exc = sys.exc_info()[1] | 519 exc = sys.exc_info()[1] |
| 520 sys.stderr.write("Failed to parse command-line arguments: %s\n\n" % exc) | 520 sys.stderr.write("Failed to parse command-line arguments: %s\n\n" % exc) |
| 521 sys.stderr.write("Usage: <script> --output_dir <output_dir> InspectorInstrum
entation.idl\n") | 521 sys.stderr.write("Usage: <script> --output_dir <output_dir> InspectorInstrum
entation.idl\n") |
| 522 exit(1) | 522 exit(1) |
| 523 | 523 |
| 524 generate(input_path, output_dirpath) | 524 generate(input_path, output_dirpath) |
| OLD | NEW |