Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h |
| diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h |
| index 44d29c0cf7f8a38eb40832d4bf54e73822a810fc..9db7a76dd22a8ef47847bfb07346da655cab4eca 100644 |
| --- a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h |
| +++ b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h |
| @@ -6,6 +6,7 @@ |
| #define CustomElementDefinition_h |
| #include "bindings/core/v8/ScriptValue.h" |
| +#include "bindings/core/v8/ScriptWrappable.h" // For TraceWrapperBase |
|
haraken
2017/04/28 08:49:30
We normally don't add this kind of comment.
|
| #include "core/CoreExport.h" |
| #include "core/dom/custom/CustomElementDescriptor.h" |
| #include "platform/heap/Handle.h" |
| @@ -23,25 +24,25 @@ class HTMLElement; |
| class QualifiedName; |
| class CORE_EXPORT CustomElementDefinition |
| - : public GarbageCollectedFinalized<CustomElementDefinition> { |
| + : public GarbageCollectedFinalized<CustomElementDefinition>, |
| + public TraceWrapperBase { |
| WTF_MAKE_NONCOPYABLE(CustomElementDefinition); |
| public: |
| + // Each definition has an ID that is unique within the |
| + // CustomElementRegistry that created it. |
| + using Id = uint32_t; |
| + |
| CustomElementDefinition(const CustomElementDescriptor&); |
| CustomElementDefinition(const CustomElementDescriptor&, |
| - const HashSet<AtomicString>&); |
| + HashSet<AtomicString>&&); |
| virtual ~CustomElementDefinition(); |
| DECLARE_VIRTUAL_TRACE(); |
| + DECLARE_VIRTUAL_TRACE_WRAPPERS() {} |
| const CustomElementDescriptor& Descriptor() { return descriptor_; } |
| - // TODO(yosin): To support Web Modules, introduce an abstract |
| - // class |CustomElementConstructor| to allow us to have JavaScript |
| - // and C++ constructors and ask the binding layer to convert |
| - // |CustomElementConstructor| to |ScriptValue|. Replace |
| - // |getConstructorForScript()| by |getConstructor() -> |
| - // CustomElementConstructor|. |
| virtual ScriptValue GetConstructorForScript() = 0; |
| using ConstructionStack = HeapVector<Member<Element>, 1>; |