| 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 "core/fetch/ResourcePtr.h" | 10 #include "core/fetch/ResourcePtr.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 void beginLoadIfNeeded(); | 24 void beginLoadIfNeeded(); |
| 25 virtual bool ensureFontData(); | 25 virtual bool ensureFontData(); |
| 26 | 26 |
| 27 #if ENABLE(SVG_FONTS) | 27 #if ENABLE(SVG_FONTS) |
| 28 virtual bool isSVGFontFaceSource() const { return false; } | 28 virtual bool isSVGFontFaceSource() const { return false; } |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 virtual void didStartFontLoad(FontResource*) OVERRIDE; | 31 virtual void didStartFontLoad(FontResource*) OVERRIDE; |
| 32 virtual void fontLoaded(FontResource*) OVERRIDE; | 32 virtual void fontLoaded(FontResource*) OVERRIDE; |
| 33 virtual void fontLoadWaitLimitExceeded(FontResource*) OVERRIDE; | 33 virtual void fontLoadWaitLimitExceeded(FontResource*) OVERRIDE; |
| 34 virtual void corsFailed(FontResource*) OVERRIDE; |
| 34 | 35 |
| 35 // For UMA reporting | 36 // For UMA reporting |
| 36 virtual bool hadBlankText() OVERRIDE { return m_histograms.hadBlankText(); } | 37 virtual bool hadBlankText() OVERRIDE { return m_histograms.hadBlankText(); } |
| 37 void paintRequested() { m_histograms.fallbackFontPainted(); } | 38 void paintRequested() { m_histograms.fallbackFontPainted(); } |
| 38 | 39 |
| 39 protected: | 40 protected: |
| 40 virtual PassRefPtr<SimpleFontData> createFontData(const FontDescription&) OV
ERRIDE; | 41 virtual PassRefPtr<SimpleFontData> createFontData(const FontDescription&) OV
ERRIDE; |
| 41 PassRefPtr<SimpleFontData> createLoadingFallbackFontData(const FontDescripti
on&); | 42 PassRefPtr<SimpleFontData> createLoadingFallbackFontData(const FontDescripti
on&); |
| 42 void pruneTable(); | 43 void pruneTable(); |
| 43 | 44 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 56 double m_fallbackPaintTime; | 57 double m_fallbackPaintTime; |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 ResourcePtr<FontResource> m_font; | 60 ResourcePtr<FontResource> m_font; |
| 60 FontLoadHistograms m_histograms; | 61 FontLoadHistograms m_histograms; |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 } // namespace WebCore | 64 } // namespace WebCore |
| 64 | 65 |
| 65 #endif | 66 #endif |
| OLD | NEW |