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

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

Issue 2453813004: WebFonts cache-aware timeout adaptation (Closed)
Patch Set: simplify by not calling cache miss callback in didAddClient() Created 4 years, 1 month 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
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 RemoteFontFaceSource_h 5 #ifndef RemoteFontFaceSource_h
6 #define RemoteFontFaceSource_h 6 #define RemoteFontFaceSource_h
7 7
8 #include "core/css/CSSFontFaceSource.h" 8 #include "core/css/CSSFontFaceSource.h"
9 #include "core/fetch/FontResource.h" 9 #include "core/fetch/FontResource.h"
10 #include "wtf/Allocator.h" 10 #include "wtf/Allocator.h"
(...skipping 26 matching lines...) Expand all
37 bool isLoading() const override; 37 bool isLoading() const override;
38 bool isLoaded() const override; 38 bool isLoaded() const override;
39 bool isValid() const override; 39 bool isValid() const override;
40 DisplayPeriod getDisplayPeriod() const { return m_period; } 40 DisplayPeriod getDisplayPeriod() const { return m_period; }
41 41
42 void beginLoadIfNeeded() override; 42 void beginLoadIfNeeded() override;
43 43
44 void notifyFinished(Resource*) override; 44 void notifyFinished(Resource*) override;
45 void fontLoadShortLimitExceeded(FontResource*) override; 45 void fontLoadShortLimitExceeded(FontResource*) override;
46 void fontLoadLongLimitExceeded(FontResource*) override; 46 void fontLoadLongLimitExceeded(FontResource*) override;
47
48 void willReloadAfterDiskCacheMiss(const FontResource*) override;
49
47 String debugName() const override { return "RemoteFontFaceSource"; } 50 String debugName() const override { return "RemoteFontFaceSource"; }
48 51
49 bool isBlank() override { return m_period == BlockPeriod; } 52 bool isBlank() override { return m_period == BlockPeriod; }
50 53
51 // For UMA reporting 54 // For UMA reporting
52 bool hadBlankText() override { return m_histograms.hadBlankText(); } 55 bool hadBlankText() override { return m_histograms.hadBlankText(); }
53 void paintRequested() { m_histograms.fallbackFontPainted(m_period); } 56 void paintRequested() { m_histograms.fallbackFontPainted(m_period); }
54 57
55 DECLARE_VIRTUAL_TRACE(); 58 DECLARE_VIRTUAL_TRACE();
56 59
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 double m_loadStartTime; 106 double m_loadStartTime;
104 double m_blankPaintTime; 107 double m_blankPaintTime;
105 bool m_isLongLimitExceeded; 108 bool m_isLongLimitExceeded;
106 DataSource m_dataSource; 109 DataSource m_dataSource;
107 FontDisplay m_fontDisplay; 110 FontDisplay m_fontDisplay;
108 }; 111 };
109 112
110 void switchToSwapPeriod(); 113 void switchToSwapPeriod();
111 void switchToFailurePeriod(); 114 void switchToFailurePeriod();
112 bool shouldTriggerWebFontsIntervention(); 115 bool shouldTriggerWebFontsIntervention();
116 bool shouldTriggerCacheAwareAdaptation();
113 117
114 Member<FontResource> m_font; 118 Member<FontResource> m_font;
115 Member<CSSFontSelector> m_fontSelector; 119 Member<CSSFontSelector> m_fontSelector;
116 const FontDisplay m_display; 120 const FontDisplay m_display;
117 DisplayPeriod m_period; 121 DisplayPeriod m_period;
118 FontLoadHistograms m_histograms; 122 FontLoadHistograms m_histograms;
119 bool m_isInterventionTriggered; 123 bool m_isInterventionTriggered;
120 }; 124 };
121 125
122 } // namespace blink 126 } // namespace blink
123 127
124 #endif 128 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698