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 "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 public: | 63 public: |
64 FontLoadHistograms() : m_loadStartTime(0), m_blankPaintTime(0), m_isLong LimitExceeded(false) { } | 64 FontLoadHistograms() : m_loadStartTime(0), m_blankPaintTime(0), m_isLong LimitExceeded(false) { } |
65 void loadStarted(); | 65 void loadStarted(); |
66 void fallbackFontPainted(DisplayPeriod); | 66 void fallbackFontPainted(DisplayPeriod); |
67 void fontLoaded(bool isInterventionTriggered, bool isLoadedFromNetwork); | 67 void fontLoaded(bool isInterventionTriggered, bool isLoadedFromNetwork); |
68 void longLimitExceeded(bool isInterventionTriggered); | 68 void longLimitExceeded(bool isInterventionTriggered); |
69 void recordFallbackTime(const FontResource*); | 69 void recordFallbackTime(const FontResource*); |
70 void recordRemoteFont(const FontResource*, bool isLoadedFromMemoryCache) ; | 70 void recordRemoteFont(const FontResource*, bool isLoadedFromMemoryCache) ; |
71 bool hadBlankText() { return m_blankPaintTime; } | 71 bool hadBlankText() { return m_blankPaintTime; } |
72 private: | 72 private: |
73 void recordLoadTimeHistogram(const FontResource*, int duration); | 73 void recordLoadTimeHistogram(const FontResource*, int duration, bool isL oadedFromNetwork); |
kouhei (in TOK)
2016/09/02 03:22:20
Can we have a enum for describing the source?
Look
Takashi Toyoshima
2016/09/02 10:51:00
Actually, it's not opposite of this since we have
| |
74 void recordInterventionResult(bool isTriggered, bool isLoadedFromNetwork ); | 74 void recordInterventionResult(bool isTriggered, bool isLoadedFromNetwork ); |
75 double m_loadStartTime; | 75 double m_loadStartTime; |
76 double m_blankPaintTime; | 76 double m_blankPaintTime; |
77 bool m_isLongLimitExceeded; | 77 bool m_isLongLimitExceeded; |
78 }; | 78 }; |
79 | 79 |
80 void switchToSwapPeriod(); | 80 void switchToSwapPeriod(); |
81 void switchToFailurePeriod(); | 81 void switchToFailurePeriod(); |
82 | 82 |
83 Member<FontResource> m_font; | 83 Member<FontResource> m_font; |
84 Member<CSSFontSelector> m_fontSelector; | 84 Member<CSSFontSelector> m_fontSelector; |
85 const FontDisplay m_display; | 85 const FontDisplay m_display; |
86 DisplayPeriod m_period; | 86 DisplayPeriod m_period; |
87 FontLoadHistograms m_histograms; | 87 FontLoadHistograms m_histograms; |
88 bool m_isInterventionTriggered; | 88 bool m_isInterventionTriggered; |
89 bool m_isLoadedFromMemoryCache; | 89 bool m_isLoadedFromMemoryCache; |
90 }; | 90 }; |
91 | 91 |
92 } // namespace blink | 92 } // namespace blink |
93 | 93 |
94 #endif | 94 #endif |
OLD | NEW |