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 "core/fetch/ResourcePtr.h" | |
10 #include "platform/Timer.h" | 9 #include "platform/Timer.h" |
11 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
12 #include "wtf/Vector.h" | 11 #include "wtf/Vector.h" |
13 | 12 |
14 namespace blink { | 13 namespace blink { |
15 | 14 |
16 class CSSFontSelector; | 15 class CSSFontSelector; |
17 class Document; | 16 class Document; |
18 class FontResource; | 17 class FontResource; |
19 | 18 |
(...skipping 17 matching lines...) Expand all Loading... |
37 DECLARE_TRACE(); | 36 DECLARE_TRACE(); |
38 | 37 |
39 private: | 38 private: |
40 FontLoader(CSSFontSelector*, Document*); | 39 FontLoader(CSSFontSelector*, Document*); |
41 void beginLoadTimerFired(Timer<FontLoader>*); | 40 void beginLoadTimerFired(Timer<FontLoader>*); |
42 void clearPendingFonts(); | 41 void clearPendingFonts(); |
43 | 42 |
44 Timer<FontLoader> m_beginLoadingTimer; | 43 Timer<FontLoader> m_beginLoadingTimer; |
45 | 44 |
46 struct FontToLoad; | 45 struct FontToLoad; |
47 using FontsToLoadVector = Vector<OwnPtr<FontToLoad>>; | 46 using FontsToLoadVector = WillBeHeapVector<OwnPtrWillBeMember<FontToLoad>>; |
48 FontsToLoadVector m_fontsToBeginLoading; | 47 FontsToLoadVector m_fontsToBeginLoading; |
49 RawPtrWillBeMember<CSSFontSelector> m_fontSelector; | 48 RawPtrWillBeMember<CSSFontSelector> m_fontSelector; |
50 RawPtrWillBeWeakMember<Document> m_document; | 49 RawPtrWillBeWeakMember<Document> m_document; |
51 }; | 50 }; |
52 | 51 |
53 } // namespace blink | 52 } // namespace blink |
54 | 53 |
55 #endif // FontLoader_h | 54 #endif // FontLoader_h |
OLD | NEW |