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" |
(...skipping 26 matching lines...) Expand all Loading... |
37 const ScriptValue& constructor, | 37 const ScriptValue& constructor, |
38 const ElementRegistrationOptions&, | 38 const ElementRegistrationOptions&, |
39 ExceptionState&); | 39 ExceptionState&); |
40 | 40 |
41 void define( | 41 void define( |
42 const AtomicString& name, | 42 const AtomicString& name, |
43 CustomElementDefinitionBuilder&, | 43 CustomElementDefinitionBuilder&, |
44 const ElementRegistrationOptions&, | 44 const ElementRegistrationOptions&, |
45 ExceptionState&); | 45 ExceptionState&); |
46 | 46 |
| 47 ScriptValue get(ScriptState*, const AtomicString& name); |
| 48 |
47 bool nameIsDefined(const AtomicString& name) const | 49 bool nameIsDefined(const AtomicString& name) const |
48 { | 50 { |
49 return m_definitions.contains(name); | 51 return m_definitions.contains(name); |
50 } | 52 } |
51 | 53 |
52 CustomElementDefinition* definitionForName(const AtomicString& name) const; | 54 CustomElementDefinition* definitionForName(const AtomicString& name) const; |
53 | 55 |
54 DECLARE_TRACE(); | 56 DECLARE_TRACE(); |
55 | 57 |
56 private: | 58 private: |
57 CustomElementsRegistry(const V0CustomElementRegistrationContext*); | 59 CustomElementsRegistry(const V0CustomElementRegistrationContext*); |
58 bool v0NameIsDefined(const AtomicString&) const; | 60 bool v0NameIsDefined(const AtomicString&) const; |
59 | 61 |
60 using DefinitionMap = | 62 using DefinitionMap = |
61 HeapHashMap<AtomicString, Member<CustomElementDefinition>>; | 63 HeapHashMap<AtomicString, Member<CustomElementDefinition>>; |
62 DefinitionMap m_definitions; | 64 DefinitionMap m_definitions; |
63 | 65 |
64 Member<const V0CustomElementRegistrationContext> m_v0; | 66 Member<const V0CustomElementRegistrationContext> m_v0; |
65 }; | 67 }; |
66 | 68 |
67 } // namespace blink | 69 } // namespace blink |
68 | 70 |
69 #endif // CustomElementsRegistry_h | 71 #endif // CustomElementsRegistry_h |
OLD | NEW |