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

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

Issue 1994093002: Introduce CustomElementRegistry#get() method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-06-01T15:09:57 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 "bindings/core/v8/ScriptValue.h"
8 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
9 #include "core/dom/custom/CustomElementDescriptor.h" 10 #include "core/dom/custom/CustomElementDescriptor.h"
10 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
11 #include "wtf/Noncopyable.h" 12 #include "wtf/Noncopyable.h"
12 13
13 namespace blink { 14 namespace blink {
14 15
16 class ScriptState;
17
15 class CORE_EXPORT CustomElementDefinition 18 class CORE_EXPORT CustomElementDefinition
16 : public GarbageCollectedFinalized<CustomElementDefinition> { 19 : public GarbageCollectedFinalized<CustomElementDefinition> {
17 WTF_MAKE_NONCOPYABLE(CustomElementDefinition); 20 WTF_MAKE_NONCOPYABLE(CustomElementDefinition);
18 public: 21 public:
19 CustomElementDefinition(const CustomElementDescriptor&); 22 CustomElementDefinition(const CustomElementDescriptor&);
20 virtual ~CustomElementDefinition(); 23 virtual ~CustomElementDefinition();
21 24
22 const CustomElementDescriptor& descriptor() { return m_descriptor; } 25 const CustomElementDescriptor& descriptor() { return m_descriptor; }
23 26
27 // TODO(yosin): To support Web Module, once we introduce abstract class
28 // |CustomElementConstructor|, allows us to have JavaScript and C++
29 // constructor, and ask binding layer to convert |CustomElementConstructor|
30 // to |ScriptValue|, we should replace |getConstructorForScript()| by
31 // |getConstructor() -> CustomElementConstructor|.
32 virtual ScriptValue getConstructorForScript() = 0;
33
24 DEFINE_INLINE_VIRTUAL_TRACE() { } 34 DEFINE_INLINE_VIRTUAL_TRACE() { }
25 35
26 private: 36 private:
27 const CustomElementDescriptor m_descriptor; 37 const CustomElementDescriptor m_descriptor;
28 }; 38 };
29 39
30 } // namespace blink 40 } // namespace blink
31 41
32 #endif // CustomElementDefinition_h 42 #endif // CustomElementDefinition_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698