Index: Source/core/css/CSSSegmentedFontFace.h |
diff --git a/Source/core/css/CSSSegmentedFontFace.h b/Source/core/css/CSSSegmentedFontFace.h |
index 6507d1763228f16a75b04eb1a8e93f6df624c66b..2796a0e02f9987a9c34835cf583186e20508d01d 100644 |
--- a/Source/core/css/CSSSegmentedFontFace.h |
+++ b/Source/core/css/CSSSegmentedFontFace.h |
@@ -26,9 +26,9 @@ |
#ifndef CSSSegmentedFontFace_h |
#define CSSSegmentedFontFace_h |
+#include "heap/Handle.h" |
#include <wtf/HashMap.h> |
#include <wtf/PassRefPtr.h> |
-#include <wtf/RefCounted.h> |
#include <wtf/Vector.h> |
#include <wtf/unicode/Unicode.h> |
@@ -40,28 +40,33 @@ class FontData; |
class FontDescription; |
class SegmentedFontData; |
-class CSSSegmentedFontFace : public RefCounted<CSSSegmentedFontFace> { |
+class CSSSegmentedFontFace : public HeapAllocatedFinalized<CSSSegmentedFontFace> { |
+ DECLARE_GC_TYPE_MARKER |
public: |
- static PassRefPtr<CSSSegmentedFontFace> create(CSSFontSelector* selector) { return adoptRef(new CSSSegmentedFontFace(selector)); } |
+ static Result<CSSSegmentedFontFace> create(CSSFontSelector* selector) { return adopt(new CSSSegmentedFontFace(selector)); } |
~CSSSegmentedFontFace(); |
CSSFontSelector* fontSelector() const { return m_fontSelector; } |
- void fontLoaded(CSSFontFace*); |
+ void fontLoaded(Handle<CSSFontFace>); |
- void appendFontFace(PassRefPtr<CSSFontFace>); |
+ void appendFontFace(Handle<CSSFontFace>); |
PassRefPtr<FontData> getFontData(const FontDescription&); |
- class LoadFontCallback : public RefCounted<LoadFontCallback> { |
+ class LoadFontCallback : public HeapAllocatedFinalized<LoadFontCallback> { |
+ DECLARE_GC_TYPE_MARKER |
public: |
virtual ~LoadFontCallback() { } |
- virtual void notifyLoaded(CSSSegmentedFontFace*) = 0; |
- virtual void notifyError(CSSSegmentedFontFace*) = 0; |
+ virtual void notifyLoaded(Handle<CSSSegmentedFontFace>) = 0; |
+ virtual void notifyError(Handle<CSSSegmentedFontFace>) = 0; |
+ virtual void accept(Visitor*) const = 0; |
}; |
bool checkFont() const; |
- void loadFont(const FontDescription&, PassRefPtr<LoadFontCallback> loadCallback); |
+ void loadFont(const FontDescription&, Handle<LoadFontCallback> loadCallback); |
+ |
+ void accept(Visitor*) const; |
private: |
CSSSegmentedFontFace(CSSFontSelector*); |
@@ -72,8 +77,8 @@ private: |
CSSFontSelector* m_fontSelector; |
HashMap<unsigned, RefPtr<SegmentedFontData> > m_fontDataTable; |
- Vector<RefPtr<CSSFontFace>, 1> m_fontFaces; |
- Vector<RefPtr<LoadFontCallback> > m_callbacks; |
+ Vector<Member<CSSFontFace>, 1> m_fontFaces; |
+ Vector<Member<LoadFontCallback> > m_callbacks; |
}; |
} // namespace WebCore |