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

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

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 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "core/dom/custom/V0CustomElementRegistry.h" 31 #include "core/dom/custom/V0CustomElementRegistry.h"
32 32
33 #include "bindings/core/v8/V0CustomElementConstructorBuilder.h" 33 #include "bindings/core/v8/V0CustomElementConstructorBuilder.h"
34 #include "bindings/core/v8/V8Binding.h" 34 #include "bindings/core/v8/V8Binding.h"
35 #include "core/HTMLNames.h" 35 #include "core/HTMLNames.h"
36 #include "core/SVGNames.h" 36 #include "core/SVGNames.h"
37 #include "core/dom/Document.h" 37 #include "core/dom/Document.h"
38 #include "core/dom/custom/CustomElementsRegistry.h" 38 #include "core/dom/custom/CustomElementRegistry.h"
39 #include "core/dom/custom/V0CustomElementException.h" 39 #include "core/dom/custom/V0CustomElementException.h"
40 #include "core/dom/custom/V0CustomElementRegistrationContext.h" 40 #include "core/dom/custom/V0CustomElementRegistrationContext.h"
41 #include "core/frame/LocalDOMWindow.h" 41 #include "core/frame/LocalDOMWindow.h"
42 42
43 namespace blink { 43 namespace blink {
44 44
45 V0CustomElementDefinition* V0CustomElementRegistry::registerElement(Document* do cument, V0CustomElementConstructorBuilder* constructorBuilder, const AtomicStrin g& userSuppliedName, V0CustomElement::NameSet validNames, ExceptionState& except ionState) 45 V0CustomElementDefinition* V0CustomElementRegistry::registerElement(Document* do cument, V0CustomElementConstructorBuilder* constructorBuilder, const AtomicStrin g& userSuppliedName, V0CustomElement::NameSet validNames, ExceptionState& except ionState)
46 { 46 {
47 AtomicString type = userSuppliedName.lower(); 47 AtomicString type = userSuppliedName.lower();
48 48
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 V0CustomElementDefinition* V0CustomElementRegistry::find(const V0CustomElementDe scriptor& descriptor) const 98 V0CustomElementDefinition* V0CustomElementRegistry::find(const V0CustomElementDe scriptor& descriptor) const
99 { 99 {
100 return m_definitions.get(descriptor); 100 return m_definitions.get(descriptor);
101 } 101 }
102 102
103 bool V0CustomElementRegistry::nameIsDefined(const AtomicString& name) const 103 bool V0CustomElementRegistry::nameIsDefined(const AtomicString& name) const
104 { 104 {
105 return m_registeredTypeNames.contains(name); 105 return m_registeredTypeNames.contains(name);
106 } 106 }
107 107
108 void V0CustomElementRegistry::setV1(const CustomElementsRegistry* v1) 108 void V0CustomElementRegistry::setV1(const CustomElementRegistry* v1)
109 { 109 {
110 DCHECK(!m_v1.get()); 110 DCHECK(!m_v1.get());
111 m_v1 = v1; 111 m_v1 = v1;
112 } 112 }
113 113
114 bool V0CustomElementRegistry::v1NameIsDefined(const AtomicString& name) const 114 bool V0CustomElementRegistry::v1NameIsDefined(const AtomicString& name) const
115 { 115 {
116 return m_v1.get() && m_v1->nameIsDefined(name); 116 return m_v1.get() && m_v1->nameIsDefined(name);
117 } 117 }
118 118
119 DEFINE_TRACE(V0CustomElementRegistry) 119 DEFINE_TRACE(V0CustomElementRegistry)
120 { 120 {
121 visitor->trace(m_definitions); 121 visitor->trace(m_definitions);
122 visitor->trace(m_v1); 122 visitor->trace(m_v1);
123 } 123 }
124 124
125 } // namespace blink 125 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.h ('k') | third_party/WebKit/Source/core/frame/DOMWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698