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