Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: third_party/WebKit/Source/platform/probe/templates/ProbeSink.h.tmpl

Issue 2790973002: [instrumentation] Introduce JSON5 config files for probe generator. (Closed)
Patch Set: add missing config files Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/probe/templates/InstrumentingProbesInl.h.tmpl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // This file is generated from {{input_file}}
2
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
5 // found in the LICENSE file.
6
7 {% set sink_class = (name | to_singular) + "Sink" %}
8
9 #ifndef {{sink_class}}_h
10 #define {{sink_class}}_h
11
12 #include "platform/heap/HeapAllocator.h"
13 {% for define in defines %}
14 {{define}}
15 {% endfor %}
16
17 namespace blink {
18
19 {% for agent in agents %}
20 class {{ agent | agent_name_to_class }};
21 {% endfor %}
22
23 class PROBE_EXPORT {{sink_class}} : public GarbageCollected<{{sink_class}}> {
24 WTF_MAKE_NONCOPYABLE({{sink_class}});
25
26 public:
27 {{sink_class}}();
28 DECLARE_TRACE();
29
30 {% for agent in agents %}
31 {% set class_name = agent | agent_name_to_class %}
32 {% set getter_name = class_name | to_lower_case %}
33 bool has{{class_name}}s() const { return m_has{{class_name}}s; }
34 const HeapHashSet<Member<{{class_name}}>>& {{getter_name}}s() const { return m _{{getter_name}}s; }
35 void add{{class_name}}({{class_name}}* agent);
36 void remove{{class_name}}({{class_name}}* agent);
37
38 {% endfor %}
39 private:
40 {% for agent in agents %}
41 {% set class_name = agent | agent_name_to_class %}
42 {% set getter_name = class_name | to_lower_case %}
43 HeapHashSet<Member<{{class_name}}>> m_{{getter_name}}s;
44 bool m_has{{class_name}}s = false;
45 {% endfor %}
46 };
47
48 } // namespace blink
49
50 #endif // !defined({{sink_class}}_h)
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/probe/templates/InstrumentingProbesInl.h.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698