| 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 11 matching lines...) Expand all Loading... |
| 22 FontResource* resource() override { return m_font.get(); } | 22 FontResource* resource() override { return m_font.get(); } |
| 23 bool isLoading() const override; | 23 bool isLoading() const override; |
| 24 bool isLoaded() const override; | 24 bool isLoaded() const override; |
| 25 bool isValid() const override; | 25 bool isValid() const override; |
| 26 | 26 |
| 27 void beginLoadIfNeeded() override; | 27 void beginLoadIfNeeded() override; |
| 28 | 28 |
| 29 void didStartFontLoad(FontResource*) override; | 29 void didStartFontLoad(FontResource*) override; |
| 30 void fontLoaded(FontResource*) override; | 30 void fontLoaded(FontResource*) override; |
| 31 void fontLoadWaitLimitExceeded(FontResource*) override; | 31 void fontLoadWaitLimitExceeded(FontResource*) override; |
| 32 String debugName() const override { return "RemoteFontFaceSource"; } |
| 32 | 33 |
| 33 // For UMA reporting | 34 // For UMA reporting |
| 34 bool hadBlankText() override { return m_histograms.hadBlankText(); } | 35 bool hadBlankText() override { return m_histograms.hadBlankText(); } |
| 35 void paintRequested() { m_histograms.fallbackFontPainted(); } | 36 void paintRequested() { m_histograms.fallbackFontPainted(); } |
| 36 | 37 |
| 37 DECLARE_VIRTUAL_TRACE(); | 38 DECLARE_VIRTUAL_TRACE(); |
| 38 | 39 |
| 39 protected: | 40 protected: |
| 40 PassRefPtr<SimpleFontData> createFontData(const FontDescription&) override; | 41 PassRefPtr<SimpleFontData> createFontData(const FontDescription&) override; |
| 41 PassRefPtr<SimpleFontData> createLoadingFallbackFontData(const FontDescripti
on&); | 42 PassRefPtr<SimpleFontData> createLoadingFallbackFontData(const FontDescripti
on&); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 58 }; | 59 }; |
| 59 | 60 |
| 60 ResourcePtr<FontResource> m_font; | 61 ResourcePtr<FontResource> m_font; |
| 61 RefPtrWillBeMember<FontLoader> m_fontLoader; | 62 RefPtrWillBeMember<FontLoader> m_fontLoader; |
| 62 FontLoadHistograms m_histograms; | 63 FontLoadHistograms m_histograms; |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 } // namespace blink | 66 } // namespace blink |
| 66 | 67 |
| 67 #endif | 68 #endif |
| OLD | NEW |