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 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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 void notifyFinished(Resource*) override; | 41 void notifyFinished(Resource*) override; |
42 void fontLoadShortLimitExceeded(FontResource*) override; | 42 void fontLoadShortLimitExceeded(FontResource*) override; |
43 void fontLoadLongLimitExceeded(FontResource*) override; | 43 void fontLoadLongLimitExceeded(FontResource*) override; |
44 String debugName() const override { return "RemoteFontFaceSource"; } | 44 String debugName() const override { return "RemoteFontFaceSource"; } |
45 | 45 |
46 // For UMA reporting | 46 // For UMA reporting |
47 bool hadBlankText() override { return m_histograms.hadBlankText(); } | 47 bool hadBlankText() override { return m_histograms.hadBlankText(); } |
48 void paintRequested() { m_histograms.fallbackFontPainted(m_period); } | 48 void paintRequested() { m_histograms.fallbackFontPainted(m_period); } |
49 | 49 |
| 50 bool isBlank() override { return m_period == BlockPeriod; } |
| 51 |
50 DECLARE_VIRTUAL_TRACE(); | 52 DECLARE_VIRTUAL_TRACE(); |
51 | 53 |
52 protected: | 54 protected: |
53 PassRefPtr<SimpleFontData> createFontData(const FontDescription&) override; | 55 PassRefPtr<SimpleFontData> createFontData(const FontDescription&) override; |
54 PassRefPtr<SimpleFontData> createLoadingFallbackFontData(const FontDescripti
on&); | 56 PassRefPtr<SimpleFontData> createLoadingFallbackFontData(const FontDescripti
on&); |
55 void pruneTable(); | 57 void pruneTable(); |
56 | 58 |
57 private: | 59 private: |
58 class FontLoadHistograms { | 60 class FontLoadHistograms { |
59 DISALLOW_NEW(); | 61 DISALLOW_NEW(); |
(...skipping 21 matching lines...) Expand all Loading... |
81 Member<CSSFontSelector> m_fontSelector; | 83 Member<CSSFontSelector> m_fontSelector; |
82 const FontDisplay m_display; | 84 const FontDisplay m_display; |
83 DisplayPeriod m_period; | 85 DisplayPeriod m_period; |
84 FontLoadHistograms m_histograms; | 86 FontLoadHistograms m_histograms; |
85 bool m_isInterventionTriggered; | 87 bool m_isInterventionTriggered; |
86 }; | 88 }; |
87 | 89 |
88 } // namespace blink | 90 } // namespace blink |
89 | 91 |
90 #endif | 92 #endif |
OLD | NEW |