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 "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/dom/custom/CustomElementDescriptor.h" | 9 #include "core/dom/custom/CustomElementDescriptor.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
11 #include "wtf/Noncopyable.h" | 11 #include "wtf/Noncopyable.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class Element; | |
16 | |
15 class CORE_EXPORT CustomElementDefinition | 17 class CORE_EXPORT CustomElementDefinition |
16 : public GarbageCollectedFinalized<CustomElementDefinition> { | 18 : public GarbageCollectedFinalized<CustomElementDefinition> { |
17 WTF_MAKE_NONCOPYABLE(CustomElementDefinition); | 19 WTF_MAKE_NONCOPYABLE(CustomElementDefinition); |
18 public: | 20 public: |
19 CustomElementDefinition(const CustomElementDescriptor&); | 21 CustomElementDefinition(const CustomElementDescriptor&); |
20 virtual ~CustomElementDefinition(); | 22 virtual ~CustomElementDefinition(); |
21 | 23 |
22 const CustomElementDescriptor& descriptor() { return m_descriptor; } | 24 const CustomElementDescriptor& descriptor() { return m_descriptor; } |
23 | 25 |
24 DEFINE_INLINE_VIRTUAL_TRACE() { } | 26 DECLARE_VIRTUAL_TRACE(); |
27 | |
28 using ConstructionStack = HeapVector<Member<Element>, 1>; | |
29 ConstructionStack& constructionStack() | |
30 { | |
31 return m_constructionStack; | |
32 } | |
33 | |
34 void upgrade(Element*); | |
35 | |
36 protected: | |
37 // TODO(dominicc): Make this pure virtual when the script side is | |
38 // implemented. | |
39 virtual bool runConstructor(Element*) { return true; } | |
yosin_UTC9
2016/06/01 06:15:44
virtual function should be in .cpp file.
http://de
| |
25 | 40 |
26 private: | 41 private: |
27 const CustomElementDescriptor m_descriptor; | 42 const CustomElementDescriptor m_descriptor; |
43 ConstructionStack m_constructionStack; | |
28 }; | 44 }; |
29 | 45 |
30 } // namespace blink | 46 } // namespace blink |
31 | 47 |
32 #endif // CustomElementDefinition_h | 48 #endif // CustomElementDefinition_h |
OLD | NEW |