| 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 "platform/wtf/text/AtomicString.h" |
| 10 #include "wtf/text/AtomicStringHash.h" | 10 #include "platform/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> initial_variable_data, | 22 PassRefPtr<CSSVariableData> initial_variable_data, |
| 23 CSSInterpolationTypes); | 23 CSSInterpolationTypes); |
| 24 const PropertyRegistration* Registration(const AtomicString&) const; | 24 const PropertyRegistration* Registration(const AtomicString&) const; |
| 25 size_t RegistrationCount() const { return registrations_.size(); } | 25 size_t RegistrationCount() const { return registrations_.size(); } |
| 26 | 26 |
| 27 DEFINE_INLINE_TRACE() { visitor->Trace(registrations_); } | 27 DEFINE_INLINE_TRACE() { visitor->Trace(registrations_); } |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 HeapHashMap<AtomicString, Member<PropertyRegistration>> registrations_; | 30 HeapHashMap<AtomicString, Member<PropertyRegistration>> registrations_; |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 } // namespace blink | 33 } // namespace blink |
| 34 | 34 |
| 35 #endif // PropertyRegistry_h | 35 #endif // PropertyRegistry_h |
| OLD | NEW |