| 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 CustomElementDefinition_h | 5 #ifndef CustomElementDefinition_h |
| 6 #define CustomElementDefinition_h | 6 #define CustomElementDefinition_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScopedPersistent.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/dom/custom/CustomElementDescriptor.h" | 9 #include "core/dom/custom/CustomElementDescriptor.h" |
| 10 #include "core/dom/custom/CustomElementsRegistry.h" | |
| 11 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 12 #include "v8.h" | 11 #include "wtf/Noncopyable.h" |
| 13 | 12 |
| 14 namespace blink { | 13 namespace blink { |
| 15 | 14 |
| 16 class CustomElementDefinition final | 15 class CORE_EXPORT CustomElementDefinition |
| 17 : public GarbageCollectedFinalized<CustomElementDefinition> { | 16 : public GarbageCollectedFinalized<CustomElementDefinition> { |
| 17 WTF_MAKE_NONCOPYABLE(CustomElementDefinition); |
| 18 public: | 18 public: |
| 19 CustomElementDefinition( | 19 CustomElementDefinition(const CustomElementDescriptor&); |
| 20 CustomElementsRegistry*, | 20 virtual ~CustomElementDefinition(); |
| 21 CustomElementsRegistry::Id, | |
| 22 const CustomElementDescriptor&); | |
| 23 | 21 |
| 24 CustomElementsRegistry::Id id() const { return m_id; } | |
| 25 const CustomElementDescriptor& descriptor() { return m_descriptor; } | 22 const CustomElementDescriptor& descriptor() { return m_descriptor; } |
| 26 v8::Local<v8::Object> prototype(ScriptState*) const; | |
| 27 | 23 |
| 28 DEFINE_INLINE_TRACE() | 24 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 29 { | |
| 30 visitor->trace(m_registry); | |
| 31 } | |
| 32 | 25 |
| 33 private: | 26 private: |
| 34 Member<CustomElementsRegistry> m_registry; | 27 const CustomElementDescriptor m_descriptor; |
| 35 CustomElementsRegistry::Id m_id; | |
| 36 CustomElementDescriptor m_descriptor; | |
| 37 }; | 28 }; |
| 38 | 29 |
| 39 } // namespace blink | 30 } // namespace blink |
| 40 | 31 |
| 41 #endif // CustomElementDefinition_h | 32 #endif // CustomElementDefinition_h |
| OLD | NEW |