OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Torch Mobile, Inc. | 3 * Copyright (C) 2009 Torch Mobile, Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 FontPlatformData FontResource::platformDataFromCustomData( | 138 FontPlatformData FontResource::platformDataFromCustomData( |
139 float size, | 139 float size, |
140 bool bold, | 140 bool bold, |
141 bool italic, | 141 bool italic, |
142 FontOrientation orientation) { | 142 FontOrientation orientation) { |
143 DCHECK(m_fontData); | 143 DCHECK(m_fontData); |
144 return m_fontData->fontPlatformData(size, bold, italic, orientation); | 144 return m_fontData->fontPlatformData(size, bold, italic, orientation); |
145 } | 145 } |
146 | 146 |
| 147 void FontResource::willReloadAfterDiskCacheMiss() { |
| 148 ProhibitAddRemoveClientInScope prohibitAddRemoveClient(this); |
| 149 |
| 150 ResourceClientWalker<FontResourceClient> walker(clients()); |
| 151 while (FontResourceClient* client = walker.next()) |
| 152 client->willReloadAfterDiskCacheMiss(this); |
| 153 } |
| 154 |
147 void FontResource::fontLoadShortLimitCallback(TimerBase*) { | 155 void FontResource::fontLoadShortLimitCallback(TimerBase*) { |
148 if (!isLoading()) | 156 if (!isLoading()) |
149 return; | 157 return; |
150 DCHECK_EQ(m_loadLimitState, UnderLimit); | 158 DCHECK_EQ(m_loadLimitState, UnderLimit); |
151 m_loadLimitState = ShortLimitExceeded; | 159 m_loadLimitState = ShortLimitExceeded; |
152 ResourceClientWalker<FontResourceClient> walker(clients()); | 160 ResourceClientWalker<FontResourceClient> walker(clients()); |
153 while (FontResourceClient* client = walker.next()) | 161 while (FontResourceClient* client = walker.next()) |
154 client->fontLoadShortLimitExceeded(this); | 162 client->fontLoadShortLimitExceeded(this); |
155 } | 163 } |
156 | 164 |
(...skipping 13 matching lines...) Expand all Loading... |
170 } | 178 } |
171 | 179 |
172 void FontResource::checkNotify() { | 180 void FontResource::checkNotify() { |
173 m_fontLoadShortLimitTimer.stop(); | 181 m_fontLoadShortLimitTimer.stop(); |
174 m_fontLoadLongLimitTimer.stop(); | 182 m_fontLoadLongLimitTimer.stop(); |
175 | 183 |
176 Resource::checkNotify(); | 184 Resource::checkNotify(); |
177 } | 185 } |
178 | 186 |
179 } // namespace blink | 187 } // namespace blink |
OLD | NEW |