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

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-05-31T14:40:56 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 "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/dom/custom/CustomElementDescriptor.h" 9 #include "core/dom/custom/CustomElementDescriptor.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
11 #include "wtf/Noncopyable.h" 11 #include "wtf/Noncopyable.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class ScriptState;
16 class ScriptValue;
dominicc (has gone to gerrit) 2016/05/31 06:01:50 Is it possible to return by value without a comple
yosin_UTC9 2016/05/31 09:16:57 It works, but users of CED needs to include "Scrip
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 virtual ScriptValue getConstructor(ScriptState*) = 0;
dominicc (has gone to gerrit) 2016/05/31 06:01:51 Write a C++ unit test that exercises this.
yosin_UTC9 2016/05/31 09:16:57 Since, getConstructor() is used for implementing C
28
24 DEFINE_INLINE_VIRTUAL_TRACE() { } 29 DEFINE_INLINE_VIRTUAL_TRACE() { }
25 30
26 private: 31 private:
27 const CustomElementDescriptor m_descriptor; 32 const CustomElementDescriptor m_descriptor;
28 }; 33 };
29 34
30 } // namespace blink 35 } // namespace blink
31 36
32 #endif // CustomElementDefinition_h 37 #endif // CustomElementDefinition_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698