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 ScriptCustomElementDefinition_h | 5 #ifndef ScriptCustomElementDefinition_h |
6 #define ScriptCustomElementDefinition_h | 6 #define ScriptCustomElementDefinition_h |
7 | 7 |
8 #include "bindings/core/v8/ScopedPersistent.h" | 8 #include "bindings/core/v8/ScopedPersistent.h" |
9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
10 #include "core/CoreExport.h" | 10 #include "core/CoreExport.h" |
(...skipping 28 matching lines...) Expand all Loading... | |
39 const v8::Local<v8::Object>& connectedCallback, | 39 const v8::Local<v8::Object>& connectedCallback, |
40 const v8::Local<v8::Object>& disconnectedCallback, | 40 const v8::Local<v8::Object>& disconnectedCallback, |
41 const v8::Local<v8::Object>& attributeChangedCallback, | 41 const v8::Local<v8::Object>& attributeChangedCallback, |
42 const HashSet<AtomicString>& observedAttributes); | 42 const HashSet<AtomicString>& observedAttributes); |
43 | 43 |
44 virtual ~ScriptCustomElementDefinition() = default; | 44 virtual ~ScriptCustomElementDefinition() = default; |
45 | 45 |
46 v8::Local<v8::Object> constructor() const; | 46 v8::Local<v8::Object> constructor() const; |
47 v8::Local<v8::Object> prototype() const; | 47 v8::Local<v8::Object> prototype() const; |
48 | 48 |
49 HTMLElement* createCustomElement(Document&, const QualifiedName&) override; | |
dominicc (has gone to gerrit)
2016/06/09 06:39:23
I think this name should be different.
First, "cu
kojii
2016/06/09 16:54:21
Renaming done in PS4 and switched to ExceptionStat
| |
50 HTMLElement* createCustomElementIgnoringErrors(Document&, const QualifiedNam e&) override; | |
51 | |
49 private: | 52 private: |
50 ScriptCustomElementDefinition( | 53 ScriptCustomElementDefinition( |
51 ScriptState*, | 54 ScriptState*, |
52 const CustomElementDescriptor&, | 55 const CustomElementDescriptor&, |
53 const v8::Local<v8::Object>& constructor, | 56 const v8::Local<v8::Object>& constructor, |
54 const v8::Local<v8::Object>& prototype, | 57 const v8::Local<v8::Object>& prototype, |
55 const v8::Local<v8::Object>& connectedCallback, | 58 const v8::Local<v8::Object>& connectedCallback, |
56 const v8::Local<v8::Object>& disconnectedCallback, | 59 const v8::Local<v8::Object>& disconnectedCallback, |
57 const v8::Local<v8::Object>& attributeChangedCallback, | 60 const v8::Local<v8::Object>& attributeChangedCallback, |
58 const HashSet<AtomicString>& observedAttributes); | 61 const HashSet<AtomicString>& observedAttributes); |
59 | 62 |
60 // Implementations of |CustomElementDefinition| | 63 // Implementations of |CustomElementDefinition| |
61 ScriptValue getConstructorForScript() final; | 64 ScriptValue getConstructorForScript() final; |
62 bool runConstructor(Element*) override; | 65 bool runConstructor(Element*) override; |
66 Element* runConstructor(); | |
67 | |
68 void throwDOMException(int exceptionCode, const String&); | |
69 void throwTypeError(const String&); | |
63 | 70 |
64 RefPtr<ScriptState> m_scriptState; | 71 RefPtr<ScriptState> m_scriptState; |
65 ScopedPersistent<v8::Object> m_constructor; | 72 ScopedPersistent<v8::Object> m_constructor; |
66 ScopedPersistent<v8::Object> m_prototype; | 73 ScopedPersistent<v8::Object> m_prototype; |
67 ScopedPersistent<v8::Object> m_connectedCallback; | 74 ScopedPersistent<v8::Object> m_connectedCallback; |
68 ScopedPersistent<v8::Object> m_disconnectedCallback; | 75 ScopedPersistent<v8::Object> m_disconnectedCallback; |
69 ScopedPersistent<v8::Object> m_attributeChangedCallback; | 76 ScopedPersistent<v8::Object> m_attributeChangedCallback; |
70 HashSet<AtomicString> m_observedAttributes; | 77 HashSet<AtomicString> m_observedAttributes; |
71 }; | 78 }; |
72 | 79 |
73 } // namespace blink | 80 } // namespace blink |
74 | 81 |
75 #endif // ScriptCustomElementDefinition_h | 82 #endif // ScriptCustomElementDefinition_h |
OLD | NEW |