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

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

Issue 2446903008: Custom Elements: Lookup custom element definition algorithm (Closed)
Patch Set: Patch Created 4 years, 1 month 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 CustomElementRegistry_h 5 #ifndef CustomElementRegistry_h
6 #define CustomElementRegistry_h 6 #define CustomElementRegistry_h
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
(...skipping 21 matching lines...) Expand all
32 : public GarbageCollectedFinalized<CustomElementRegistry>, 32 : public GarbageCollectedFinalized<CustomElementRegistry>,
33 public ScriptWrappable { 33 public ScriptWrappable {
34 DEFINE_WRAPPERTYPEINFO(); 34 DEFINE_WRAPPERTYPEINFO();
35 WTF_MAKE_NONCOPYABLE(CustomElementRegistry); 35 WTF_MAKE_NONCOPYABLE(CustomElementRegistry);
36 36
37 public: 37 public:
38 static CustomElementRegistry* create(const LocalDOMWindow*); 38 static CustomElementRegistry* create(const LocalDOMWindow*);
39 39
40 virtual ~CustomElementRegistry() = default; 40 virtual ~CustomElementRegistry() = default;
41 41
42 void define(ScriptState*, 42 CustomElementDefinition* define(ScriptState*,
43 const AtomicString& name, 43 const AtomicString& name,
44 const ScriptValue& constructor, 44 const ScriptValue& constructor,
45 const ElementDefinitionOptions&, 45 const ElementDefinitionOptions&,
46 ExceptionState&); 46 ExceptionState&);
47 47
48 void define(const AtomicString& name, 48 CustomElementDefinition* define(const AtomicString& name,
49 CustomElementDefinitionBuilder&, 49 CustomElementDefinitionBuilder&,
50 const ElementDefinitionOptions&, 50 const ElementDefinitionOptions&,
51 ExceptionState&); 51 ExceptionState&);
52 52
53 ScriptValue get(const AtomicString& name); 53 ScriptValue get(const AtomicString& name);
54 bool nameIsDefined(const AtomicString& name) const; 54 bool nameIsDefined(const AtomicString& name) const;
55 CustomElementDefinition* definitionForName(const AtomicString& name) const; 55 CustomElementDefinition* definitionForName(const AtomicString& name) const;
56 56
57 // TODO(dominicc): Switch most callers of definitionForName to 57 // TODO(dominicc): Switch most callers of definitionForName to
58 // definitionFor when implementing type extensions. 58 // definitionFor when implementing type extensions.
59 CustomElementDefinition* definitionFor(const CustomElementDescriptor&) const; 59 CustomElementDefinition* definitionFor(const CustomElementDescriptor&) const;
60 60
61 // TODO(dominicc): Consider broadening this API when type extensions are 61 // TODO(dominicc): Consider broadening this API when type extensions are
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 Member<UpgradeCandidateMap> m_upgradeCandidates; 98 Member<UpgradeCandidateMap> m_upgradeCandidates;
99 99
100 using WhenDefinedPromiseMap = 100 using WhenDefinedPromiseMap =
101 HeapHashMap<AtomicString, Member<ScriptPromiseResolver>>; 101 HeapHashMap<AtomicString, Member<ScriptPromiseResolver>>;
102 WhenDefinedPromiseMap m_whenDefinedPromiseMap; 102 WhenDefinedPromiseMap m_whenDefinedPromiseMap;
103 }; 103 };
104 104
105 } // namespace blink 105 } // namespace blink
106 106
107 #endif // CustomElementRegistry_h 107 #endif // CustomElementRegistry_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698