OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are met: | 5 * modification, are permitted provided that the following conditions are met: |
6 * | 6 * |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 visitor->trace(m_fontFaces); | 131 visitor->trace(m_fontFaces); |
132 FontFaceSetIterable::IterationSource::trace(visitor); | 132 FontFaceSetIterable::IterationSource::trace(visitor); |
133 } | 133 } |
134 | 134 |
135 private: | 135 private: |
136 size_t m_index; | 136 size_t m_index; |
137 WillBeHeapVector<RefPtrWillBeMember<FontFace>> m_fontFaces; | 137 WillBeHeapVector<RefPtrWillBeMember<FontFace>> m_fontFaces; |
138 }; | 138 }; |
139 | 139 |
140 class FontLoadHistogram { | 140 class FontLoadHistogram { |
141 DISALLOW_ALLOCATION(); | 141 DISALLOW_NEW(); |
142 public: | 142 public: |
143 enum Status { NoWebFonts, HadBlankText, DidNotHaveBlankText, Reported }; | 143 enum Status { NoWebFonts, HadBlankText, DidNotHaveBlankText, Reported }; |
144 FontLoadHistogram() : m_status(NoWebFonts), m_count(0), m_recorded(false
) { } | 144 FontLoadHistogram() : m_status(NoWebFonts), m_count(0), m_recorded(false
) { } |
145 void incrementCount() { m_count++; } | 145 void incrementCount() { m_count++; } |
146 void updateStatus(FontFace*); | 146 void updateStatus(FontFace*); |
147 void record(); | 147 void record(); |
148 | 148 |
149 private: | 149 private: |
150 Status m_status; | 150 Status m_status; |
151 int m_count; | 151 int m_count; |
(...skipping 25 matching lines...) Expand all Loading... |
177 WillBeHeapListHashSet<RefPtrWillBeMember<FontFace>> m_nonCSSConnectedFaces; | 177 WillBeHeapListHashSet<RefPtrWillBeMember<FontFace>> m_nonCSSConnectedFaces; |
178 | 178 |
179 AsyncMethodRunner<FontFaceSet> m_asyncRunner; | 179 AsyncMethodRunner<FontFaceSet> m_asyncRunner; |
180 | 180 |
181 FontLoadHistogram m_histogram; | 181 FontLoadHistogram m_histogram; |
182 }; | 182 }; |
183 | 183 |
184 } // namespace blink | 184 } // namespace blink |
185 | 185 |
186 #endif // FontFaceSet_h | 186 #endif // FontFaceSet_h |
OLD | NEW |