OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CustomElementsRegistry_h | 5 #ifndef CustomElementsRegistry_h |
6 #define CustomElementsRegistry_h | 6 #define CustomElementsRegistry_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 #include "wtf/HashSet.h" |
11 #include "wtf/Noncopyable.h" | 12 #include "wtf/Noncopyable.h" |
12 #include "wtf/text/AtomicString.h" | 13 #include "wtf/text/AtomicString.h" |
13 #include "wtf/text/AtomicStringHash.h" | 14 #include "wtf/text/AtomicStringHash.h" |
14 | 15 |
15 namespace blink { | 16 namespace blink { |
16 | 17 |
17 class CustomElementDefinition; | 18 class CustomElementDefinition; |
18 class CustomElementDefinitionBuilder; | 19 class CustomElementDefinitionBuilder; |
19 class ElementRegistrationOptions; | 20 class ElementRegistrationOptions; |
20 class ExceptionState; | 21 class ExceptionState; |
(...skipping 29 matching lines...) Expand all Loading... |
50 } | 51 } |
51 | 52 |
52 CustomElementDefinition* definitionForName(const AtomicString& name) const; | 53 CustomElementDefinition* definitionForName(const AtomicString& name) const; |
53 | 54 |
54 DECLARE_TRACE(); | 55 DECLARE_TRACE(); |
55 | 56 |
56 private: | 57 private: |
57 CustomElementsRegistry(const V0CustomElementRegistrationContext*); | 58 CustomElementsRegistry(const V0CustomElementRegistrationContext*); |
58 bool v0NameIsDefined(const AtomicString&) const; | 59 bool v0NameIsDefined(const AtomicString&) const; |
59 | 60 |
| 61 class NameIsBeingDefined; |
| 62 |
| 63 HashSet<AtomicString> m_namesBeingDefined; |
60 using DefinitionMap = | 64 using DefinitionMap = |
61 HeapHashMap<AtomicString, Member<CustomElementDefinition>>; | 65 HeapHashMap<AtomicString, Member<CustomElementDefinition>>; |
62 DefinitionMap m_definitions; | 66 DefinitionMap m_definitions; |
63 | 67 |
64 Member<const V0CustomElementRegistrationContext> m_v0; | 68 Member<const V0CustomElementRegistrationContext> m_v0; |
65 }; | 69 }; |
66 | 70 |
67 } // namespace blink | 71 } // namespace blink |
68 | 72 |
69 #endif // CustomElementsRegistry_h | 73 #endif // CustomElementsRegistry_h |
OLD | NEW |