OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 FontLoader_h | 5 #ifndef FontLoader_h |
6 #define FontLoader_h | 6 #define FontLoader_h |
7 | 7 |
8 #include "core/fetch/ResourceLoader.h" | 8 #include "core/fetch/ResourceLoader.h" |
9 #include "platform/Timer.h" | 9 #include "platform/Timer.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
11 #include "wtf/Vector.h" | 11 #include "wtf/Vector.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class CSSFontSelector; | 15 class CSSFontSelector; |
16 class Document; | 16 class Document; |
17 class FontResource; | 17 class FontResource; |
18 | 18 |
19 class FontLoader : public GarbageCollectedFinalized<FontLoader> { | 19 class FontLoader : public GarbageCollectedFinalized<FontLoader> { |
20 public: | 20 public: |
21 static RawPtr<FontLoader> create(CSSFontSelector* fontSelector, Document* do
cument) | 21 static FontLoader* create(CSSFontSelector* fontSelector, Document* document) |
22 { | 22 { |
23 return new FontLoader(fontSelector, document); | 23 return new FontLoader(fontSelector, document); |
24 } | 24 } |
25 ~FontLoader(); | 25 ~FontLoader(); |
26 | 26 |
27 void addFontToBeginLoading(FontResource*); | 27 void addFontToBeginLoading(FontResource*); |
28 void loadPendingFonts(); | 28 void loadPendingFonts(); |
29 void fontFaceInvalidated(); | 29 void fontFaceInvalidated(); |
30 void didFailToDecode(FontResource*); | 30 void didFailToDecode(FontResource*); |
31 | 31 |
(...skipping 13 matching lines...) Expand all Loading... |
45 struct FontToLoad; | 45 struct FontToLoad; |
46 using FontsToLoadVector = HeapVector<Member<FontToLoad>>; | 46 using FontsToLoadVector = HeapVector<Member<FontToLoad>>; |
47 FontsToLoadVector m_fontsToBeginLoading; | 47 FontsToLoadVector m_fontsToBeginLoading; |
48 Member<CSSFontSelector> m_fontSelector; | 48 Member<CSSFontSelector> m_fontSelector; |
49 WeakMember<Document> m_document; | 49 WeakMember<Document> m_document; |
50 }; | 50 }; |
51 | 51 |
52 } // namespace blink | 52 } // namespace blink |
53 | 53 |
54 #endif // FontLoader_h | 54 #endif // FontLoader_h |
OLD | NEW |