Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h

Issue 1985623002: [WIP] Custom element upgrades (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a C++-only test.' Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 virtual bool upgrade(Element*) = 0;
25 35
26 private: 36 private:
27 const CustomElementDescriptor m_descriptor; 37 const CustomElementDescriptor m_descriptor;
38 ConstructionStack m_constructionStack;
28 }; 39 };
29 40
30 } // namespace blink 41 } // namespace blink
31 42
32 #endif // CustomElementDefinition_h 43 #endif // CustomElementDefinition_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698