| 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 WebCore { | 12 namespace WebCore { |
| 13 | 13 |
| 14 class RemoteFontFaceSource : public CSSFontFaceSource, public FontResourceClient
{ | 14 class RemoteFontFaceSource : public CSSFontFaceSource, public FontResourceClient
{ |
| 15 public: | 15 public: |
| 16 RemoteFontFaceSource(FontResource*); | 16 explicit RemoteFontFaceSource(FontResource*); |
| 17 virtual ~RemoteFontFaceSource(); | 17 virtual ~RemoteFontFaceSource(); |
| 18 | 18 |
| 19 virtual FontResource* resource() OVERRIDE { return m_font.get(); } | 19 virtual FontResource* resource() OVERRIDE { return m_font.get(); } |
| 20 virtual bool isLoading() const OVERRIDE; | 20 virtual bool isLoading() const OVERRIDE; |
| 21 virtual bool isLoaded() const OVERRIDE; | 21 virtual bool isLoaded() const OVERRIDE; |
| 22 virtual bool isValid() const OVERRIDE; | 22 virtual bool isValid() const OVERRIDE; |
| 23 | 23 |
| 24 void beginLoadIfNeeded(); | 24 void beginLoadIfNeeded(); |
| 25 virtual bool ensureFontData(); | 25 virtual bool ensureFontData(); |
| 26 | 26 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 56 double m_fallbackPaintTime; | 56 double m_fallbackPaintTime; |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 ResourcePtr<FontResource> m_font; | 59 ResourcePtr<FontResource> m_font; |
| 60 FontLoadHistograms m_histograms; | 60 FontLoadHistograms m_histograms; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace WebCore | 63 } // namespace WebCore |
| 64 | 64 |
| 65 #endif | 65 #endif |
| OLD | NEW |