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

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: Another rebase! 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 USING_PRE_FINALIZER(FontLoader, dispose);
21 public:
22 static FontLoader* create(CSSFontSelector* fontSelector, Document* document)
23 {
24 return new FontLoader(fontSelector, document);
25 }
26 ~FontLoader();
27 void dispose();
28
29 void addFontToBeginLoading(FontResource*);
30 void loadPendingFonts();
31 void fontFaceInvalidated();
32 void didFailToDecode(FontResource*);
33
34 DECLARE_TRACE();
35
36 private:
37 FontLoader(CSSFontSelector*, Document*);
38 void beginLoadTimerFired(Timer<FontLoader>*);
39 void clearPendingFonts();
40
41 Timer<FontLoader> m_beginLoadingTimer;
42
43 struct FontToLoad;
44 using FontsToLoadVector = HeapVector<Member<FontToLoad>>;
45 FontsToLoadVector m_fontsToBeginLoading;
46 Member<CSSFontSelector> m_fontSelector;
47 WeakMember<Document> m_document;
48 };
49
50 } // namespace blink
51
52 #endif // FontLoader_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/FontFace.cpp ('k') | third_party/WebKit/Source/core/css/FontLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698