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

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

Issue 2277713002: Rename CustomElementsRegistry to CustomElementRegistry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 24 matching lines...) Expand all
35 #include "core/dom/custom/V0CustomElementDefinition.h" 35 #include "core/dom/custom/V0CustomElementDefinition.h"
36 #include "core/dom/custom/V0CustomElementDescriptor.h" 36 #include "core/dom/custom/V0CustomElementDescriptor.h"
37 #include "core/dom/custom/V0CustomElementDescriptorHash.h" 37 #include "core/dom/custom/V0CustomElementDescriptorHash.h"
38 #include "wtf/HashMap.h" 38 #include "wtf/HashMap.h"
39 #include "wtf/HashSet.h" 39 #include "wtf/HashSet.h"
40 #include "wtf/text/AtomicString.h" 40 #include "wtf/text/AtomicString.h"
41 #include "wtf/text/AtomicStringHash.h" 41 #include "wtf/text/AtomicStringHash.h"
42 42
43 namespace blink { 43 namespace blink {
44 44
45 class CustomElementsRegistry; 45 class CustomElementRegistry;
46 class ExceptionState; 46 class ExceptionState;
47 class V0CustomElementConstructorBuilder; 47 class V0CustomElementConstructorBuilder;
48 48
49 class V0CustomElementRegistry final { 49 class V0CustomElementRegistry final {
50 WTF_MAKE_NONCOPYABLE(V0CustomElementRegistry); 50 WTF_MAKE_NONCOPYABLE(V0CustomElementRegistry);
51 DISALLOW_NEW(); 51 DISALLOW_NEW();
52 public: 52 public:
53 DECLARE_TRACE(); 53 DECLARE_TRACE();
54 void documentWasDetached() { m_documentWasDetached = true; } 54 void documentWasDetached() { m_documentWasDetached = true; }
55 55
56 protected: 56 protected:
57 friend class V0CustomElementRegistrationContext; 57 friend class V0CustomElementRegistrationContext;
58 58
59 V0CustomElementRegistry() : m_documentWasDetached(false) { } 59 V0CustomElementRegistry() : m_documentWasDetached(false) { }
60 60
61 V0CustomElementDefinition* registerElement(Document*, V0CustomElementConstru ctorBuilder*, const AtomicString& name, V0CustomElement::NameSet validNames, Exc eptionState&); 61 V0CustomElementDefinition* registerElement(Document*, V0CustomElementConstru ctorBuilder*, const AtomicString& name, V0CustomElement::NameSet validNames, Exc eptionState&);
62 V0CustomElementDefinition* find(const V0CustomElementDescriptor&) const; 62 V0CustomElementDefinition* find(const V0CustomElementDescriptor&) const;
63 63
64 bool nameIsDefined(const AtomicString& name) const; 64 bool nameIsDefined(const AtomicString& name) const;
65 void setV1(const CustomElementsRegistry*); 65 void setV1(const CustomElementRegistry*);
66 66
67 private: 67 private:
68 bool v1NameIsDefined(const AtomicString& name) const; 68 bool v1NameIsDefined(const AtomicString& name) const;
69 69
70 typedef HeapHashMap<V0CustomElementDescriptor, Member<V0CustomElementDefinit ion>> DefinitionMap; 70 typedef HeapHashMap<V0CustomElementDescriptor, Member<V0CustomElementDefinit ion>> DefinitionMap;
71 DefinitionMap m_definitions; 71 DefinitionMap m_definitions;
72 HashSet<AtomicString> m_registeredTypeNames; 72 HashSet<AtomicString> m_registeredTypeNames;
73 Member<const CustomElementsRegistry> m_v1; 73 Member<const CustomElementRegistry> m_v1;
74 bool m_documentWasDetached; 74 bool m_documentWasDetached;
75 }; 75 };
76 76
77 } // namespace blink 77 } // namespace blink
78 78
79 #endif // V0CustomElementRegistry_h 79 #endif // V0CustomElementRegistry_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698