Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: Source/core/css/RemoteFontFaceSource.h

Issue 656913006: Remove SVG fonts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update tests for landing Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 : public CSSFontFaceSource, public FontResourceClient {
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;
27 virtual bool ensureFontData(); 27 virtual bool ensureFontData();
28 28
29 #if ENABLE(SVG_FONTS)
30 virtual bool isSVGFontFaceSource() const { return false; }
31 #endif
32
33 virtual void didStartFontLoad(FontResource*) override; 29 virtual void didStartFontLoad(FontResource*) override;
34 virtual void fontLoaded(FontResource*) override; 30 virtual void fontLoaded(FontResource*) override;
35 virtual void fontLoadWaitLimitExceeded(FontResource*) override; 31 virtual void fontLoadWaitLimitExceeded(FontResource*) override;
36 32
37 // For UMA reporting 33 // For UMA reporting
38 virtual bool hadBlankText() override { return m_histograms.hadBlankText(); } 34 virtual bool hadBlankText() override { return m_histograms.hadBlankText(); }
39 void paintRequested() { m_histograms.fallbackFontPainted(); } 35 void paintRequested() { m_histograms.fallbackFontPainted(); }
40 36
41 virtual void trace(Visitor*) override; 37 virtual void trace(Visitor*) override;
42 38
(...skipping 18 matching lines...) Expand all
61 }; 57 };
62 58
63 ResourcePtr<FontResource> m_font; 59 ResourcePtr<FontResource> m_font;
64 RefPtrWillBeMember<FontLoader> m_fontLoader; 60 RefPtrWillBeMember<FontLoader> m_fontLoader;
65 FontLoadHistograms m_histograms; 61 FontLoadHistograms m_histograms;
66 }; 62 };
67 63
68 } // namespace blink 64 } // namespace blink
69 65
70 #endif 66 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698