OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8CustomElementPerContextData_h |
| 6 #define V8CustomElementPerContextData_h |
| 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "platform/heap/Handle.h" |
| 10 #include "wtf/Noncopyable.h" |
| 11 #include "wtf/OwnPtr.h" |
| 12 #include "wtf/PassOwnPtr.h" |
| 13 #include "wtf/Vector.h" |
| 14 |
| 15 namespace blink { |
| 16 |
| 17 class ScriptCustomElementDefinition; |
| 18 class V0CustomElementBinding; |
| 19 |
| 20 class CORE_EXPORT V8CustomElementPerContextData final |
| 21 : public GarbageCollectedFinalized<V8CustomElementPerContextData> { |
| 22 WTF_MAKE_NONCOPYABLE(V8CustomElementPerContextData); |
| 23 public: |
| 24 V8CustomElementPerContextData(); |
| 25 ~V8CustomElementPerContextData(); |
| 26 |
| 27 DECLARE_TRACE(); |
| 28 |
| 29 void v0AddBinding(PassOwnPtr<V0CustomElementBinding>); |
| 30 |
| 31 uint32_t addDefinition(ScriptCustomElementDefinition*); |
| 32 ScriptCustomElementDefinition* getDefinition(uint32_t index); |
| 33 |
| 34 private: |
| 35 typedef Vector<OwnPtr<V0CustomElementBinding>> V0CustomElementBindingList; |
| 36 V0CustomElementBindingList m_v0Bindings; |
| 37 |
| 38 using CustomElementDefinitionVector = HeapVector<Member<ScriptCustomElementD
efinition>>; |
| 39 CustomElementDefinitionVector m_definitions; |
| 40 }; |
| 41 |
| 42 } // namespace blink |
| 43 |
| 44 #endif // V8CustomElementPerContextData_h |
OLD | NEW |