Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: Source/core/css/CSSSegmentedFontFace.h

Issue 18856015: [oilpan] Move CSSFontFace to the managed heap (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 class CSSSegmentedFontFace : public HeapAllocatedFinalized<CSSSegmentedFontFace> { 44 class CSSSegmentedFontFace : public HeapAllocatedFinalized<CSSSegmentedFontFace> {
45 DECLARE_GC_TYPE_MARKER 45 DECLARE_GC_TYPE_MARKER
46 public: 46 public:
47 static Result<CSSSegmentedFontFace> create(CSSFontSelector* selector) { retu rn adopt(new CSSSegmentedFontFace(selector)); } 47 static Result<CSSSegmentedFontFace> create(CSSFontSelector* selector) { retu rn adopt(new CSSSegmentedFontFace(selector)); }
48 ~CSSSegmentedFontFace(); 48 ~CSSSegmentedFontFace();
49 void dispose(); 49 void dispose();
50 50
51 CSSFontSelector* fontSelector() const { return m_fontSelector; } 51 CSSFontSelector* fontSelector() const { return m_fontSelector; }
52 52
53 void fontLoaded(CSSFontFace*); 53 void fontLoaded(Handle<CSSFontFace>);
54 54
55 void appendFontFace(PassRefPtr<CSSFontFace>); 55 void appendFontFace(Handle<CSSFontFace>);
56 56
57 PassRefPtr<FontData> getFontData(const FontDescription&); 57 PassRefPtr<FontData> getFontData(const FontDescription&);
58 58
59 class LoadFontCallback : public RefCounted<LoadFontCallback> { 59 class LoadFontCallback : public RefCounted<LoadFontCallback> {
60 public: 60 public:
61 virtual ~LoadFontCallback() { } 61 virtual ~LoadFontCallback() { }
62 virtual void notifyLoaded(Handle<CSSSegmentedFontFace>) = 0; 62 virtual void notifyLoaded(Handle<CSSSegmentedFontFace>) = 0;
63 virtual void notifyError(Handle<CSSSegmentedFontFace>) = 0; 63 virtual void notifyError(Handle<CSSSegmentedFontFace>) = 0;
64 }; 64 };
65 65
66 bool checkFont() const; 66 bool checkFont() const;
67 void loadFont(const FontDescription&, PassRefPtr<LoadFontCallback> loadCallb ack); 67 void loadFont(const FontDescription&, PassRefPtr<LoadFontCallback> loadCallb ack);
68 68
69 void accept(Visitor*) const { } 69 void accept(Visitor*) const;
70 70
71 private: 71 private:
72 CSSSegmentedFontFace(CSSFontSelector*); 72 CSSSegmentedFontFace(CSSFontSelector*);
73 73
74 void pruneTable(); 74 void pruneTable();
75 bool isValid() const; 75 bool isValid() const;
76 bool isLoading() const; 76 bool isLoading() const;
77 77
78 CSSFontSelector* m_fontSelector; 78 CSSFontSelector* m_fontSelector;
79 HashMap<unsigned, RefPtr<SegmentedFontData> > m_fontDataTable; 79 HashMap<unsigned, RefPtr<SegmentedFontData> > m_fontDataTable;
80 Vector<RefPtr<CSSFontFace>, 1> m_fontFaces; 80 Vector<Member<CSSFontFace>, 1> m_fontFaces;
81 Vector<RefPtr<LoadFontCallback> > m_callbacks; 81 Vector<RefPtr<LoadFontCallback> > m_callbacks;
82 }; 82 };
83 83
84 } // namespace WebCore 84 } // namespace WebCore
85 85
86 #endif // CSSSegmentedFontFace_h 86 #endif // CSSSegmentedFontFace_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698