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

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

Issue 1996213002: Add a tuple of name, local name for hashing custom element definitions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bring patch to head. Created 4 years, 7 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/ScopedPersistent.h" 8 #include "bindings/core/v8/ScopedPersistent.h"
9 #include "core/dom/custom/CustomElementDescriptor.h"
9 #include "core/dom/custom/CustomElementsRegistry.h" 10 #include "core/dom/custom/CustomElementsRegistry.h"
10 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
11 #include "v8.h" 12 #include "v8.h"
12 #include "wtf/text/AtomicString.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class CustomElementDefinition final 16 class CustomElementDefinition final
17 : public GarbageCollectedFinalized<CustomElementDefinition> { 17 : public GarbageCollectedFinalized<CustomElementDefinition> {
18 public: 18 public:
19 CustomElementDefinition( 19 CustomElementDefinition(
20 CustomElementsRegistry*, 20 CustomElementsRegistry*,
21 CustomElementsRegistry::Id, 21 CustomElementsRegistry::Id,
22 const AtomicString& localName); 22 const CustomElementDescriptor&);
23 23
24 CustomElementsRegistry::Id id() const { return m_id; } 24 CustomElementsRegistry::Id id() const { return m_id; }
25 const AtomicString& localName() const { return m_localName; } 25 const CustomElementDescriptor& descriptor() { return m_descriptor; }
26 v8::Local<v8::Object> prototype(ScriptState*) const; 26 v8::Local<v8::Object> prototype(ScriptState*) const;
27 27
28 DEFINE_INLINE_TRACE() 28 DEFINE_INLINE_TRACE()
29 { 29 {
30 visitor->trace(m_registry); 30 visitor->trace(m_registry);
31 } 31 }
32 32
33 private: 33 private:
34 Member<CustomElementsRegistry> m_registry; 34 Member<CustomElementsRegistry> m_registry;
35 CustomElementsRegistry::Id m_id; 35 CustomElementsRegistry::Id m_id;
36 AtomicString m_localName; 36 CustomElementDescriptor m_descriptor;
37 }; 37 };
38 38
39 } // namespace blink 39 } // namespace blink
40 40
41 #endif // CustomElementDefinition_h 41 #endif // CustomElementDefinition_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698