| OLD | NEW |
| (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 #ifndef InstrumentingAgents_h | |
| 8 #define InstrumentingAgents_h | |
| 9 | |
| 10 #include "core/CoreExport.h" | |
| 11 #include "platform/heap/HeapAllocator.h" | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 {% for agent in agents %} | |
| 16 class {{ agent | agent_name_to_class }}; | |
| 17 {% endfor %} | |
| 18 | |
| 19 class CORE_EXPORT InstrumentingAgents : public GarbageCollected<InstrumentingAge
nts> { | |
| 20 WTF_MAKE_NONCOPYABLE(InstrumentingAgents); | |
| 21 | |
| 22 public: | |
| 23 InstrumentingAgents(); | |
| 24 DECLARE_TRACE(); | |
| 25 | |
| 26 {% for agent in agents %} | |
| 27 {% set class_name = agent | agent_name_to_class %} | |
| 28 {% set getter_name = class_name | to_lower_case %} | |
| 29 bool has{{class_name}}s() const { return m_has{{class_name}}s; } | |
| 30 const HeapHashSet<Member<{{class_name}}>>& {{getter_name}}s() const { return m
_{{getter_name}}s; } | |
| 31 void add{{class_name}}({{class_name}}* agent); | |
| 32 void remove{{class_name}}({{class_name}}* agent); | |
| 33 | |
| 34 {% endfor %} | |
| 35 private: | |
| 36 {% for agent in agents %} | |
| 37 {% set class_name = agent | agent_name_to_class %} | |
| 38 {% set getter_name = class_name | to_lower_case %} | |
| 39 HeapHashSet<Member<{{class_name}}>> m_{{getter_name}}s; | |
| 40 bool m_has{{class_name}}s = false; | |
| 41 {% endfor %} | |
| 42 }; | |
| 43 | |
| 44 } // namespace blink | |
| 45 | |
| 46 #endif // !defined(InstrumentingAgents_h) | |
| OLD | NEW |