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

Side by Side Diff: third_party/WebKit/Source/core/css/FontLoader.h

Issue 1829403002: Clean up font loading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Resource_status
Patch Set: Created 4 years, 8 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef FontLoader_h
6 #define FontLoader_h
7
8 #include "core/fetch/ResourceLoader.h"
9 #include "platform/Timer.h"
10 #include "platform/heap/Handle.h"
11 #include "wtf/Vector.h"
12
13 namespace blink {
14
15 class CSSFontSelector;
16 class Document;
17 class FontResource;
18
19 class FontLoader : public GarbageCollectedFinalized<FontLoader> {
20 public:
21 static FontLoader* create(CSSFontSelector* fontSelector, Document* document)
22 {
23 return new FontLoader(fontSelector, document);
24 }
25 ~FontLoader();
26
27 void addFontToBeginLoading(FontResource*);
28 void loadPendingFonts();
29 void fontFaceInvalidated();
30 void didFailToDecode(FontResource*);
31
32 #if !ENABLE(OILPAN)
33 void clearDocumentAndFontSelector();
34 #endif
35
36 DECLARE_TRACE();
37
38 private:
39 FontLoader(CSSFontSelector*, Document*);
40 void beginLoadTimerFired(Timer<FontLoader>*);
41 void clearPendingFonts();
42
43 Timer<FontLoader> m_beginLoadingTimer;
44
45 struct FontToLoad;
46 using FontsToLoadVector = HeapVector<Member<FontToLoad>>;
47 FontsToLoadVector m_fontsToBeginLoading;
48 Member<CSSFontSelector> m_fontSelector;
49 WeakMember<Document> m_document;
50 };
51
52 } // namespace blink
53
54 #endif // FontLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698