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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 return PackageFormatSFNT; | 69 return PackageFormatSFNT; |
70 } | 70 } |
71 | 71 |
72 static void recordPackageFormatHistogram(FontPackageFormat format) | 72 static void recordPackageFormatHistogram(FontPackageFormat format) |
73 { | 73 { |
74 blink::Platform::current()->histogramEnumeration("WebFont.PackageFormat", fo
rmat, PackageFormatEnumMax); | 74 blink::Platform::current()->histogramEnumeration("WebFont.PackageFormat", fo
rmat, PackageFormatEnumMax); |
75 } | 75 } |
76 | 76 |
77 FontResource::FontResource(const ResourceRequest& resourceRequest) | 77 FontResource::FontResource(const ResourceRequest& resourceRequest) |
78 : Resource(resourceRequest, Font) | 78 : Resource(resourceRequest, Font) |
| 79 , m_loadScheduled(false) |
79 , m_loadInitiated(false) | 80 , m_loadInitiated(false) |
80 , m_exceedsFontLoadWaitLimit(false) | 81 , m_exceedsFontLoadWaitLimit(false) |
81 , m_corsFailed(false) | 82 , m_corsFailed(false) |
82 , m_fontLoadWaitLimitTimer(this, &FontResource::fontLoadWaitLimitCallback) | 83 , m_fontLoadWaitLimitTimer(this, &FontResource::fontLoadWaitLimitCallback) |
83 { | 84 { |
84 } | 85 } |
85 | 86 |
86 FontResource::~FontResource() | 87 FontResource::~FontResource() |
87 { | 88 { |
88 } | 89 } |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 | 230 |
230 void FontResource::checkNotify() | 231 void FontResource::checkNotify() |
231 { | 232 { |
232 m_fontLoadWaitLimitTimer.stop(); | 233 m_fontLoadWaitLimitTimer.stop(); |
233 ResourceClientWalker<FontResourceClient> w(m_clients); | 234 ResourceClientWalker<FontResourceClient> w(m_clients); |
234 while (FontResourceClient* c = w.next()) | 235 while (FontResourceClient* c = w.next()) |
235 c->fontLoaded(this); | 236 c->fontLoaded(this); |
236 } | 237 } |
237 | 238 |
238 } | 239 } |
OLD | NEW |