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 | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 InspectorInstrumentation::didReceiveData(m_frame, identifier, data, dataLeng
th, encodedDataLength); | 172 InspectorInstrumentation::didReceiveData(m_frame, identifier, data, dataLeng
th, encodedDataLength); |
173 } | 173 } |
174 | 174 |
175 void FrameFetchContext::dispatchDidDownloadData(DocumentLoader*, unsigned long i
dentifier, int dataLength, int encodedDataLength) | 175 void FrameFetchContext::dispatchDidDownloadData(DocumentLoader*, unsigned long i
dentifier, int dataLength, int encodedDataLength) |
176 { | 176 { |
177 if (Page* page = m_frame->page()) | 177 if (Page* page = m_frame->page()) |
178 page->progress().incrementProgress(identifier, 0, dataLength); | 178 page->progress().incrementProgress(identifier, 0, dataLength); |
179 InspectorInstrumentation::didReceiveData(m_frame, identifier, 0, dataLength,
encodedDataLength); | 179 InspectorInstrumentation::didReceiveData(m_frame, identifier, 0, dataLength,
encodedDataLength); |
180 } | 180 } |
181 | 181 |
182 void FrameFetchContext::dispatchDidFinishLoading(DocumentLoader* loader, unsigne
d long identifier, double finishTime) | 182 void FrameFetchContext::dispatchDidFinishLoading(DocumentLoader* loader, unsigne
d long identifier, double finishTime, int64_t encodedDataLength) |
183 { | 183 { |
184 if (Page* page = m_frame->page()) | 184 if (Page* page = m_frame->page()) |
185 page->progress().completeProgress(identifier); | 185 page->progress().completeProgress(identifier); |
186 m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier); | 186 m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier); |
187 | 187 |
188 InspectorInstrumentation::didFinishLoading(m_frame, identifier, ensureLoader
(loader), finishTime); | 188 InspectorInstrumentation::didFinishLoading(m_frame, identifier, ensureLoader
(loader), finishTime, encodedDataLength); |
189 } | 189 } |
190 | 190 |
191 void FrameFetchContext::dispatchDidFail(DocumentLoader* loader, unsigned long id
entifier, const ResourceError& error) | 191 void FrameFetchContext::dispatchDidFail(DocumentLoader* loader, unsigned long id
entifier, const ResourceError& error) |
192 { | 192 { |
193 if (Page* page = m_frame->page()) | 193 if (Page* page = m_frame->page()) |
194 page->progress().completeProgress(identifier); | 194 page->progress().completeProgress(identifier); |
195 InspectorInstrumentation::didFailLoading(m_frame, identifier, ensureLoader(l
oader), error); | 195 InspectorInstrumentation::didFailLoading(m_frame, identifier, ensureLoader(l
oader), error); |
196 } | 196 } |
197 | 197 |
198 void FrameFetchContext::sendRemainingDelegateMessages(DocumentLoader* loader, un
signed long identifier, const ResourceResponse& response, int dataLength) | 198 void FrameFetchContext::sendRemainingDelegateMessages(DocumentLoader* loader, un
signed long identifier, const ResourceResponse& response, int dataLength) |
199 { | 199 { |
200 if (!response.isNull()) | 200 if (!response.isNull()) |
201 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); | 201 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); |
202 | 202 |
203 if (dataLength > 0) | 203 if (dataLength > 0) |
204 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength,
0); | 204 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength,
0); |
205 | 205 |
206 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0); | 206 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0); |
207 } | 207 } |
208 | 208 |
209 } // namespace WebCore | 209 } // namespace WebCore |
OLD | NEW |