Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / dom / ElementDataCache.h
index d275f1e..73a0738 100644 (file)
@@ -27,6 +27,7 @@
 #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;
 };