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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h

Issue 2035623002: Implement the script parts of custom element upgrade steps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ce-upgrade-in-document-dom-merge2
Patch Set: Do not assign in conditional to unbreak windows builder. 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 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 "core/CoreExport.h" 10 #include "core/CoreExport.h"
10 #include "core/dom/custom/CustomElementDefinition.h" 11 #include "core/dom/custom/CustomElementDefinition.h"
11 #include "v8.h" 12 #include "v8.h"
12 #include "wtf/Noncopyable.h" 13 #include "wtf/Noncopyable.h"
14 #include "wtf/RefPtr.h"
13 15
14 namespace blink { 16 namespace blink {
15 17
16 class CustomElementDescriptor; 18 class CustomElementDescriptor;
17 class CustomElementsRegistry; 19 class CustomElementsRegistry;
18 class ScriptState;
19 20
20 class CORE_EXPORT ScriptCustomElementDefinition final : 21 class CORE_EXPORT ScriptCustomElementDefinition final :
21 public CustomElementDefinition { 22 public CustomElementDefinition {
22 WTF_MAKE_NONCOPYABLE(ScriptCustomElementDefinition); 23 WTF_MAKE_NONCOPYABLE(ScriptCustomElementDefinition);
23 public: 24 public:
24 static ScriptCustomElementDefinition* forConstructor( 25 static ScriptCustomElementDefinition* forConstructor(
25 ScriptState*, 26 ScriptState*,
26 CustomElementsRegistry*, 27 CustomElementsRegistry*,
27 const v8::Local<v8::Value>& constructor); 28 const v8::Local<v8::Value>& constructor);
28 29
(...skipping 11 matching lines...) Expand all
40 41
41 private: 42 private:
42 ScriptCustomElementDefinition( 43 ScriptCustomElementDefinition(
43 ScriptState*, 44 ScriptState*,
44 const CustomElementDescriptor&, 45 const CustomElementDescriptor&,
45 const v8::Local<v8::Object>& constructor, 46 const v8::Local<v8::Object>& constructor,
46 const v8::Local<v8::Object>& prototype); 47 const v8::Local<v8::Object>& prototype);
47 48
48 // Implementations of |CustomElementDefinition| 49 // Implementations of |CustomElementDefinition|
49 ScriptValue getConstructorForScript() final; 50 ScriptValue getConstructorForScript() final;
51 bool runConstructor(Element*) override;
50 52
51 RefPtr<ScriptState> m_scriptState; 53 RefPtr<ScriptState> m_scriptState;
52 ScopedPersistent<v8::Object> m_constructor; 54 ScopedPersistent<v8::Object> m_constructor;
53 ScopedPersistent<v8::Object> m_prototype; 55 ScopedPersistent<v8::Object> m_prototype;
54 }; 56 };
55 57
56 } // namespace blink 58 } // namespace blink
57 59
58 #endif // ScriptCustomElementDefinition_h 60 #endif // ScriptCustomElementDefinition_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698