OLD | NEW |
1 // This file is generated from {{input_file}} | 1 // This file is generated from {{input_file}} |
2 | 2 |
3 // Copyright 2017 The Chromium Authors. All rights reserved. | 3 // Copyright 2017 The Chromium Authors. All rights reserved. |
4 // Use of this source code is governed by a BSD-style license that can be | 4 // Use of this source code is governed by a BSD-style license that can be |
5 // found in the LICENSE file. | 5 // found in the LICENSE file. |
6 | 6 |
7 #ifndef {{file.header_name}}_h | 7 #ifndef {{file.header_name}}_h |
8 #define {{file.header_name}}_h | 8 #define {{file.header_name}}_h |
9 | 9 |
| 10 #include "platform/heap/HeapAllocator.h" |
10 {% for include in file.includes %} | 11 {% for include in file.includes %} |
11 {{include}} | 12 {{include}} |
12 {% endfor %} | 13 {% endfor %} |
13 | 14 |
| 15 {% for define in file.defines %} |
| 16 {{define}} |
| 17 {% endfor %} |
| 18 |
14 namespace blink { | 19 namespace blink { |
15 | 20 |
16 {% for forward_decl in file.forward_declarations %} | 21 {% for forward_decl in file.forward_declarations %} |
17 {{forward_decl}} | 22 {{forward_decl}} |
18 {% endfor %} | 23 {% endfor %} |
19 | 24 |
20 namespace probe { | 25 namespace probe { |
21 {% for probe in file.declarations %} | 26 {% for probe in file.declarations %} |
22 | 27 |
23 {%- macro params_decl(probe) %} | 28 {%- macro params_decl(probe) %} |
24 {%- for param in probe.params %} | 29 {%- for param in probe.params %} |
25 {{ param.type }} | 30 {{ param.type }} |
26 {%- if param.default_value %} = {{ param.default_value }} | 31 {%- if param.default_value %} = {{ param.default_value }} |
27 {%- endif %} | 32 {%- endif %} |
28 {%- if not loop.last %}, {% endif %} | 33 {%- if not loop.last %}, {% endif %} |
29 {%- endfor %} | 34 {%- endfor %} |
30 {%- endmacro -%} | 35 {%- endmacro -%} |
31 | 36 |
32 {% if probe.is_scoped %} | 37 {% if probe.is_scoped %} |
33 | 38 |
34 | 39 |
35 class CORE_EXPORT {{probe.name}} : public ProbeBase { | 40 class PROBE_EXPORT {{probe.name}} : public ProbeBase { |
36 STACK_ALLOCATED() | 41 STACK_ALLOCATED() |
37 public: | 42 public: |
38 explicit {{probe.name}}({{ params_decl(probe) }}); | 43 explicit {{probe.name}}({{ params_decl(probe) }}); |
39 ~{{probe.name}}(); | 44 ~{{probe.name}}(); |
40 {% for param in probe.params %} | 45 {% for param in probe.params %} |
41 {{param.member_type}} {{param.name}}; | 46 {{param.member_type}} {{param.name}}; |
42 {% endfor %} | 47 {% endfor %} |
43 }; | 48 }; |
44 {%- else %} | 49 {%- else %} |
45 | 50 |
46 CORE_EXPORT {{probe.return_type}} {{probe.name}}({{ params_decl(probe) }}); | 51 PROBE_EXPORT {{probe.return_type}} {{probe.name}}({{ params_decl(probe) }}); |
47 | 52 |
48 {%- endif %} | 53 {%- endif %} |
49 {%- endfor %} | 54 {%- endfor %} |
50 | 55 |
51 | 56 |
52 } // namespace probe | 57 } // namespace probe |
53 } // namespace blink | 58 } // namespace blink |
54 | 59 |
55 #endif // !defined({{file.header_name}}_h) | 60 #endif // !defined({{file.header_name}}_h) |
OLD | NEW |