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

Side by Side Diff: sky/engine/core/css/RemoteFontFaceSource.h

Issue 723253004: Remove tons of OILPAN. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/css/Rect.cpp ('k') | sky/engine/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 16 matching lines...) Expand all
27 virtual bool ensureFontData(); 27 virtual bool ensureFontData();
28 28
29 virtual void didStartFontLoad(FontResource*) override; 29 virtual void didStartFontLoad(FontResource*) override;
30 virtual void fontLoaded(FontResource*) override; 30 virtual void fontLoaded(FontResource*) override;
31 virtual void fontLoadWaitLimitExceeded(FontResource*) override; 31 virtual void fontLoadWaitLimitExceeded(FontResource*) override;
32 32
33 // For UMA reporting 33 // For UMA reporting
34 virtual bool hadBlankText() override { return m_histograms.hadBlankText(); } 34 virtual bool hadBlankText() override { return m_histograms.hadBlankText(); }
35 void paintRequested() { m_histograms.fallbackFontPainted(); } 35 void paintRequested() { m_histograms.fallbackFontPainted(); }
36 36
37 virtual void trace(Visitor*) override;
38
39 protected: 37 protected:
40 virtual PassRefPtr<SimpleFontData> createFontData(const FontDescription&) ov erride; 38 virtual PassRefPtr<SimpleFontData> createFontData(const FontDescription&) ov erride;
41 PassRefPtr<SimpleFontData> createLoadingFallbackFontData(const FontDescripti on&); 39 PassRefPtr<SimpleFontData> createLoadingFallbackFontData(const FontDescripti on&);
42 void pruneTable(); 40 void pruneTable();
43 41
44 private: 42 private:
45 class FontLoadHistograms { 43 class FontLoadHistograms {
46 public: 44 public:
47 FontLoadHistograms() : m_loadStartTime(0), m_fallbackPaintTime(0) { } 45 FontLoadHistograms() : m_loadStartTime(0), m_fallbackPaintTime(0) { }
48 void loadStarted(); 46 void loadStarted();
49 void fallbackFontPainted(); 47 void fallbackFontPainted();
50 void recordRemoteFont(const FontResource*); 48 void recordRemoteFont(const FontResource*);
51 void recordFallbackTime(const FontResource*); 49 void recordFallbackTime(const FontResource*);
52 bool hadBlankText() { return m_fallbackPaintTime; } 50 bool hadBlankText() { return m_fallbackPaintTime; }
53 private: 51 private:
54 const char* histogramName(const FontResource*); 52 const char* histogramName(const FontResource*);
55 double m_loadStartTime; 53 double m_loadStartTime;
56 double m_fallbackPaintTime; 54 double m_fallbackPaintTime;
57 }; 55 };
58 56
59 ResourcePtr<FontResource> m_font; 57 ResourcePtr<FontResource> m_font;
60 RefPtr<FontLoader> m_fontLoader; 58 RefPtr<FontLoader> m_fontLoader;
61 FontLoadHistograms m_histograms; 59 FontLoadHistograms m_histograms;
62 }; 60 };
63 61
64 } // namespace blink 62 } // namespace blink
65 63
66 #endif 64 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/css/Rect.cpp ('k') | sky/engine/core/css/RemoteFontFaceSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698