Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: Source/core/fetch/FontResource.cpp

Issue 189833009: Trace where timers were scheduled in Blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/events/GenericEventQueue.cpp ('k') | Source/core/fetch/MemoryCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 Resource::didAddClient(c); 71 Resource::didAddClient(c);
72 if (!isLoading()) 72 if (!isLoading())
73 static_cast<FontResourceClient*>(c)->fontLoaded(this); 73 static_cast<FontResourceClient*>(c)->fontLoaded(this);
74 } 74 }
75 75
76 void FontResource::beginLoadIfNeeded(ResourceFetcher* dl) 76 void FontResource::beginLoadIfNeeded(ResourceFetcher* dl)
77 { 77 {
78 if (!m_loadInitiated) { 78 if (!m_loadInitiated) {
79 m_loadInitiated = true; 79 m_loadInitiated = true;
80 Resource::load(dl, m_options); 80 Resource::load(dl, m_options);
81 m_fontLoadWaitLimitTimer.startOneShot(fontLoadWaitLimitSec); 81 m_fontLoadWaitLimitTimer.startOneShot(fontLoadWaitLimitSec, FROM_HERE);
82 82
83 ResourceClientWalker<FontResourceClient> walker(m_clients); 83 ResourceClientWalker<FontResourceClient> walker(m_clients);
84 while (FontResourceClient* client = walker.next()) 84 while (FontResourceClient* client = walker.next())
85 client->didStartFontLoad(this); 85 client->didStartFontLoad(this);
86 } 86 }
87 } 87 }
88 88
89 bool FontResource::ensureCustomFontData() 89 bool FontResource::ensureCustomFontData()
90 { 90 {
91 if (!m_fontData && !errorOccurred() && !isLoading()) { 91 if (!m_fontData && !errorOccurred() && !isLoading()) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 void FontResource::checkNotify() 179 void FontResource::checkNotify()
180 { 180 {
181 m_fontLoadWaitLimitTimer.stop(); 181 m_fontLoadWaitLimitTimer.stop();
182 ResourceClientWalker<FontResourceClient> w(m_clients); 182 ResourceClientWalker<FontResourceClient> w(m_clients);
183 while (FontResourceClient* c = w.next()) 183 while (FontResourceClient* c = w.next())
184 c->fontLoaded(this); 184 c->fontLoaded(this);
185 } 185 }
186 186
187 } 187 }
OLDNEW
« no previous file with comments | « Source/core/events/GenericEventQueue.cpp ('k') | Source/core/fetch/MemoryCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698