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

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-31T18:12:12 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): We should ask binding layer to convert C++ constructor
dominicc (has gone to gerrit) 2016/05/31 22:56:32 This TODO covers "what"--ask the binding layer to
28 // value to ScriptValue, e.g. introduce |CustomElementConsturcotr|
dominicc (has gone to gerrit) 2016/05/31 22:56:32 spelling: constructor
yosin_UTC9 2016/06/01 02:14:37 Done.
29 // class with |ScripttCustomElementConsturcotr|
dominicc (has gone to gerrit) 2016/05/31 22:56:32 spelling: script, constructor
yosin_UTC9 2016/06/01 02:14:37 Done.
30 virtual ScriptValue getConstructor(ScriptState*) = 0;
dominicc (has gone to gerrit) 2016/05/31 22:56:32 What do you think about calling this getConstructo
yosin_UTC9 2016/06/01 02:14:37 Done. Use getConstructorForScript()
31
24 DEFINE_INLINE_VIRTUAL_TRACE() { } 32 DEFINE_INLINE_VIRTUAL_TRACE() { }
25 33
26 private: 34 private:
27 const CustomElementDescriptor m_descriptor; 35 const CustomElementDescriptor m_descriptor;
28 }; 36 };
29 37
30 } // namespace blink 38 } // namespace blink
31 39
32 #endif // CustomElementDefinition_h 40 #endif // CustomElementDefinition_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698