| 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 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/css/RemoteFontFaceSource.h" | 6 #include "core/css/RemoteFontFaceSource.h" |
| 7 | 7 |
| 8 #include "core/css/CSSCustomFontData.h" | 8 #include "core/css/CSSCustomFontData.h" |
| 9 #include "core/css/CSSFontFace.h" | 9 #include "core/css/CSSFontFace.h" |
| 10 #include "core/css/FontLoader.h" | 10 #include "core/css/FontLoader.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 if (m_face) | 125 if (m_face) |
| 126 m_face->didBeginLoad(); | 126 m_face->didBeginLoad(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 bool RemoteFontFaceSource::ensureFontData() | 129 bool RemoteFontFaceSource::ensureFontData() |
| 130 { | 130 { |
| 131 return m_font->ensureCustomFontData(); | 131 return m_font->ensureCustomFontData(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 void RemoteFontFaceSource::trace(Visitor* visitor) | |
| 135 { | |
| 136 visitor->trace(m_fontLoader); | |
| 137 CSSFontFaceSource::trace(visitor); | |
| 138 } | |
| 139 | |
| 140 void RemoteFontFaceSource::FontLoadHistograms::loadStarted() | 134 void RemoteFontFaceSource::FontLoadHistograms::loadStarted() |
| 141 { | 135 { |
| 142 if (!m_loadStartTime) | 136 if (!m_loadStartTime) |
| 143 m_loadStartTime = currentTimeMS(); | 137 m_loadStartTime = currentTimeMS(); |
| 144 } | 138 } |
| 145 | 139 |
| 146 void RemoteFontFaceSource::FontLoadHistograms::fallbackFontPainted() | 140 void RemoteFontFaceSource::FontLoadHistograms::fallbackFontPainted() |
| 147 { | 141 { |
| 148 if (!m_fallbackPaintTime) | 142 if (!m_fallbackPaintTime) |
| 149 m_fallbackPaintTime = currentTimeMS(); | 143 m_fallbackPaintTime = currentTimeMS(); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 if (size < 50 * 1024) | 182 if (size < 50 * 1024) |
| 189 return "WebFont.DownloadTime.1.10KBTo50KB"; | 183 return "WebFont.DownloadTime.1.10KBTo50KB"; |
| 190 if (size < 100 * 1024) | 184 if (size < 100 * 1024) |
| 191 return "WebFont.DownloadTime.2.50KBTo100KB"; | 185 return "WebFont.DownloadTime.2.50KBTo100KB"; |
| 192 if (size < 1024 * 1024) | 186 if (size < 1024 * 1024) |
| 193 return "WebFont.DownloadTime.3.100KBTo1MB"; | 187 return "WebFont.DownloadTime.3.100KBTo1MB"; |
| 194 return "WebFont.DownloadTime.4.Over1MB"; | 188 return "WebFont.DownloadTime.4.Over1MB"; |
| 195 } | 189 } |
| 196 | 190 |
| 197 } // namespace blink | 191 } // namespace blink |
| OLD | NEW |