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

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

Issue 2170383002: CustomElements: adopt node (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge conflict resolution Created 4 years, 4 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 "bindings/core/v8/ScriptValue.h" 8 #include "bindings/core/v8/ScriptValue.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "core/dom/custom/CustomElementDescriptor.h" 10 #include "core/dom/custom/CustomElementDescriptor.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 virtual HTMLElement* createElementSync(Document&, const QualifiedName&) = 0; 51 virtual HTMLElement* createElementSync(Document&, const QualifiedName&) = 0;
52 virtual HTMLElement* createElementSync(Document&, const QualifiedName&, Exce ptionState&) = 0; 52 virtual HTMLElement* createElementSync(Document&, const QualifiedName&, Exce ptionState&) = 0;
53 HTMLElement* createElementAsync(Document&, const QualifiedName&); 53 HTMLElement* createElementAsync(Document&, const QualifiedName&);
54 54
55 void upgrade(Element*); 55 void upgrade(Element*);
56 56
57 virtual bool hasConnectedCallback() const = 0; 57 virtual bool hasConnectedCallback() const = 0;
58 virtual bool hasDisconnectedCallback() const = 0; 58 virtual bool hasDisconnectedCallback() const = 0;
59 virtual bool hasAdoptedCallback() const = 0;
59 bool hasAttributeChangedCallback(const QualifiedName&) const; 60 bool hasAttributeChangedCallback(const QualifiedName&) const;
60 bool hasStyleAttributeChangedCallback() const; 61 bool hasStyleAttributeChangedCallback() const;
61 62
62 virtual void runConnectedCallback(Element*) = 0; 63 virtual void runConnectedCallback(Element*) = 0;
63 virtual void runDisconnectedCallback(Element*) = 0; 64 virtual void runDisconnectedCallback(Element*) = 0;
65 virtual void runAdoptedCallback(Element*) = 0;
64 virtual void runAttributeChangedCallback(Element*, const QualifiedName&, 66 virtual void runAttributeChangedCallback(Element*, const QualifiedName&,
65 const AtomicString& oldValue, const AtomicString& newValue) = 0; 67 const AtomicString& oldValue, const AtomicString& newValue) = 0;
66 68
67 void enqueueUpgradeReaction(Element*); 69 void enqueueUpgradeReaction(Element*);
68 void enqueueConnectedCallback(Element*); 70 void enqueueConnectedCallback(Element*);
69 void enqueueDisconnectedCallback(Element*); 71 void enqueueDisconnectedCallback(Element*);
72 void enqueueAdoptedCallback(Element*);
70 void enqueueAttributeChangedCallback(Element*, const QualifiedName&, 73 void enqueueAttributeChangedCallback(Element*, const QualifiedName&,
71 const AtomicString& oldValue, const AtomicString& newValue); 74 const AtomicString& oldValue, const AtomicString& newValue);
72 75
73 protected: 76 protected:
74 virtual bool runConstructor(Element*) = 0; 77 virtual bool runConstructor(Element*) = 0;
75 78
76 static void checkConstructorResult(Element*, Document&, const QualifiedName& , ExceptionState&); 79 static void checkConstructorResult(Element*, Document&, const QualifiedName& , ExceptionState&);
77 80
78 private: 81 private:
79 const CustomElementDescriptor m_descriptor; 82 const CustomElementDescriptor m_descriptor;
80 ConstructionStack m_constructionStack; 83 ConstructionStack m_constructionStack;
81 HashSet<AtomicString> m_observedAttributes; 84 HashSet<AtomicString> m_observedAttributes;
82 bool m_hasStyleAttributeChangedCallback; 85 bool m_hasStyleAttributeChangedCallback;
83 86
84 void enqueueAttributeChangedCallbackForAllAttributes(Element*); 87 void enqueueAttributeChangedCallbackForAllAttributes(Element*);
85 }; 88 };
86 89
87 } // namespace blink 90 } // namespace blink
88 91
89 #endif // CustomElementDefinition_h 92 #endif // CustomElementDefinition_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698