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

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

Issue 2772613002: [instrumentation] Rename InspectorInstrumentation into CoreProbes (Closed)
Patch Set: fix typo 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
OLDNEW
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 {% set agents_class = name + "Agents" %} 7 {% set sink_class = (name | to_singular) + "Sink" %}
8 8
9 #ifndef {{agents_class}}_h 9 #ifndef {{sink_class}}_h
10 #define {{agents_class}}_h 10 #define {{sink_class}}_h
11 11
12 #include "platform/heap/HeapAllocator.h" 12 #include "platform/heap/HeapAllocator.h"
13 {% for define in defines %} 13 {% for define in defines %}
14 {{define}} 14 {{define}}
15 {% endfor %} 15 {% endfor %}
16 16
17 namespace blink { 17 namespace blink {
18 18
19 {% for agent in agents %} 19 {% for agent in agents %}
20 class {{ agent | agent_name_to_class }}; 20 class {{ agent | agent_name_to_class }};
21 {% endfor %} 21 {% endfor %}
22 22
23 class PROBE_EXPORT {{agents_class}} : public GarbageCollected<{{agents_class}}> { 23 class PROBE_EXPORT {{sink_class}} : public GarbageCollected<{{sink_class}}> {
24 WTF_MAKE_NONCOPYABLE({{agents_class}}); 24 WTF_MAKE_NONCOPYABLE({{sink_class}});
25 25
26 public: 26 public:
27 {{agents_class}}(); 27 {{sink_class}}();
28 DECLARE_TRACE(); 28 DECLARE_TRACE();
29 29
30 {% for agent in agents %} 30 {% for agent in agents %}
31 {% set class_name = agent | agent_name_to_class %} 31 {% set class_name = agent | agent_name_to_class %}
32 {% set getter_name = class_name | to_lower_case %} 32 {% set getter_name = class_name | to_lower_case %}
33 bool has{{class_name}}s() const { return m_has{{class_name}}s; } 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; } 34 const HeapHashSet<Member<{{class_name}}>>& {{getter_name}}s() const { return m _{{getter_name}}s; }
35 void add{{class_name}}({{class_name}}* agent); 35 void add{{class_name}}({{class_name}}* agent);
36 void remove{{class_name}}({{class_name}}* agent); 36 void remove{{class_name}}({{class_name}}* agent);
37 37
38 {% endfor %} 38 {% endfor %}
39 private: 39 private:
40 {% for agent in agents %} 40 {% for agent in agents %}
41 {% set class_name = agent | agent_name_to_class %} 41 {% set class_name = agent | agent_name_to_class %}
42 {% set getter_name = class_name | to_lower_case %} 42 {% set getter_name = class_name | to_lower_case %}
43 HeapHashSet<Member<{{class_name}}>> m_{{getter_name}}s; 43 HeapHashSet<Member<{{class_name}}>> m_{{getter_name}}s;
44 bool m_has{{class_name}}s = false; 44 bool m_has{{class_name}}s = false;
45 {% endfor %} 45 {% endfor %}
46 }; 46 };
47 47
48 } // namespace blink 48 } // namespace blink
49 49
50 #endif // !defined({{agents_class}}_h) 50 #endif // !defined({{sink_class}}_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698