| OLD | NEW |
| 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 PropertyRegistry_h | 5 #ifndef PropertyRegistry_h |
| 6 #define PropertyRegistry_h | 6 #define PropertyRegistry_h |
| 7 | 7 |
| 8 #include "core/css/PropertyRegistration.h" | 8 #include "core/css/PropertyRegistration.h" |
| 9 #include "wtf/text/AtomicString.h" | 9 #include "wtf/text/AtomicString.h" |
| 10 #include "wtf/text/AtomicStringHash.h" | 10 #include "wtf/text/AtomicStringHash.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class PropertyRegistry : public GarbageCollected<PropertyRegistry> { | 14 class PropertyRegistry : public GarbageCollected<PropertyRegistry> { |
| 15 public: | 15 public: |
| 16 static PropertyRegistry* create() { return new PropertyRegistry(); } | 16 static PropertyRegistry* create() { return new PropertyRegistry(); } |
| 17 | 17 |
| 18 void registerProperty(const AtomicString&, | 18 void registerProperty(const AtomicString&, |
| 19 const CSSSyntaxDescriptor&, | 19 const CSSSyntaxDescriptor&, |
| 20 bool inherits, | 20 bool inherits, |
| 21 const CSSValue* initial, | 21 const CSSValue* initial, |
| 22 PassRefPtr<CSSVariableData> initialVariableData, | 22 PassRefPtr<CSSVariableData> initialVariableData, |
| 23 InterpolationTypes); | 23 CSSInterpolationTypes); |
| 24 const PropertyRegistration* registration(const AtomicString&) const; | 24 const PropertyRegistration* registration(const AtomicString&) const; |
| 25 size_t registrationCount() const { return m_registrations.size(); } | 25 size_t registrationCount() const { return m_registrations.size(); } |
| 26 | 26 |
| 27 DEFINE_INLINE_TRACE() { visitor->trace(m_registrations); } | 27 DEFINE_INLINE_TRACE() { visitor->trace(m_registrations); } |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 HeapHashMap<AtomicString, Member<PropertyRegistration>> m_registrations; | 30 HeapHashMap<AtomicString, Member<PropertyRegistration>> m_registrations; |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 } // namespace blink | 33 } // namespace blink |
| 34 | 34 |
| 35 #endif // PropertyRegistry_h | 35 #endif // PropertyRegistry_h |
| OLD | NEW |