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

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

Issue 230383003: Webfont CORS-enabled fetching with fallback (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase & reverse the enum values Created 6 years, 8 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
« no previous file with comments | « Source/core/css/CSSFontFaceSrcValue.cpp ('k') | Source/core/css/RemoteFontFaceSource.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 13 matching lines...) Expand all
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
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
OLDNEW
« no previous file with comments | « Source/core/css/CSSFontFaceSrcValue.cpp ('k') | Source/core/css/RemoteFontFaceSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698