| 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" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class FontLoader; | 14 class FontLoader; |
| 15 | 15 |
| 16 class RemoteFontFaceSource : public CSSFontFaceSource, public FontResourceClient
{ | 16 class RemoteFontFaceSource final : public CSSFontFaceSource, public FontResource
Client { |
| 17 public: | 17 public: |
| 18 explicit RemoteFontFaceSource(FontResource*, PassRefPtrWillBeRawPtr<FontLoad
er>); | 18 explicit RemoteFontFaceSource(FontResource*, PassRefPtrWillBeRawPtr<FontLoad
er>); |
| 19 virtual ~RemoteFontFaceSource(); | 19 virtual ~RemoteFontFaceSource(); |
| 20 | 20 |
| 21 virtual FontResource* resource() override { return m_font.get(); } | 21 virtual FontResource* resource() override { return m_font.get(); } |
| 22 virtual bool isLoading() const override; | 22 virtual bool isLoading() const override; |
| 23 virtual bool isLoaded() const override; | 23 virtual bool isLoaded() const override; |
| 24 virtual bool isValid() const override; | 24 virtual bool isValid() const override; |
| 25 | 25 |
| 26 void beginLoadIfNeeded() override; | 26 void beginLoadIfNeeded() override; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 ResourcePtr<FontResource> m_font; | 59 ResourcePtr<FontResource> m_font; |
| 60 RefPtrWillBeMember<FontLoader> m_fontLoader; | 60 RefPtrWillBeMember<FontLoader> m_fontLoader; |
| 61 FontLoadHistograms m_histograms; | 61 FontLoadHistograms m_histograms; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace blink | 64 } // namespace blink |
| 65 | 65 |
| 66 #endif | 66 #endif |
| OLD | NEW |