OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 if (m_streamer) | 174 if (m_streamer) |
175 m_streamer->notifyFinished(resource); | 175 m_streamer->notifyFinished(resource); |
176 } | 176 } |
177 | 177 |
178 void PendingScript::notifyAppendData(ScriptResource* resource) | 178 void PendingScript::notifyAppendData(ScriptResource* resource) |
179 { | 179 { |
180 if (m_streamer) | 180 if (m_streamer) |
181 m_streamer->notifyAppendData(resource); | 181 m_streamer->notifyAppendData(resource); |
182 } | 182 } |
183 | 183 |
| 184 void PendingScript::notifyCancel(ScriptResource*) |
| 185 { |
| 186 if (m_streamer) |
| 187 m_streamer->cancel(); |
| 188 } |
| 189 |
184 DEFINE_TRACE(PendingScript) | 190 DEFINE_TRACE(PendingScript) |
185 { | 191 { |
186 visitor->trace(m_element); | 192 visitor->trace(m_element); |
187 visitor->trace(m_streamer); | 193 visitor->trace(m_streamer); |
188 visitor->trace(m_client); | 194 visitor->trace(m_client); |
189 ResourceOwner<ScriptResource>::trace(visitor); | 195 ResourceOwner<ScriptResource>::trace(visitor); |
190 } | 196 } |
191 | 197 |
192 ScriptSourceCode PendingScript::getSource(const KURL& documentURL, bool& errorOc
curred) const | 198 ScriptSourceCode PendingScript::getSource(const KURL& documentURL, bool& errorOc
curred) const |
193 { | 199 { |
(...skipping 27 matching lines...) Expand all Loading... |
221 bool PendingScript::errorOccurred() const | 227 bool PendingScript::errorOccurred() const |
222 { | 228 { |
223 if (resource()) | 229 if (resource()) |
224 return resource()->errorOccurred(); | 230 return resource()->errorOccurred(); |
225 if (m_streamer && m_streamer->resource()) | 231 if (m_streamer && m_streamer->resource()) |
226 return m_streamer->resource()->errorOccurred(); | 232 return m_streamer->resource()->errorOccurred(); |
227 return false; | 233 return false; |
228 } | 234 } |
229 | 235 |
230 } // namespace blink | 236 } // namespace blink |
OLD | NEW |