#ifndef ElementDataCache_h
#define ElementDataCache_h
+#include "platform/heap/Handle.h"
#include "wtf/HashMap.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/Vector.h"
#include "wtf/text/StringHash.h"
-namespace WebCore {
+namespace blink {
class Attribute;
class ShareableElementData;
-class ShareableElementDataCacheEntry;
-class ElementDataCache {
+class ElementDataCache FINAL : public NoBaseWillBeGarbageCollected<ElementDataCache> {
+ DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(ElementDataCache)
public:
- static PassOwnPtr<ElementDataCache> create() { return adoptPtr(new ElementDataCache); }
- ~ElementDataCache();
+ static PassOwnPtrWillBeRawPtr<ElementDataCache> create() { return adoptPtrWillBeNoop(new ElementDataCache); }
- PassRefPtr<ShareableElementData> cachedShareableElementDataWithAttributes(const Vector<Attribute>&);
+ PassRefPtrWillBeRawPtr<ShareableElementData> cachedShareableElementDataWithAttributes(const Vector<Attribute>&);
+
+ void trace(Visitor*);
private:
ElementDataCache();
- typedef HashMap<unsigned, RefPtr<ShareableElementData>, AlreadyHashed> ShareableElementDataCache;
+ typedef WillBeHeapHashMap<unsigned, RefPtrWillBeMember<ShareableElementData>, AlreadyHashed> ShareableElementDataCache;
ShareableElementDataCache m_shareableElementDataCache;
};