| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 void FrameFetchContext::dispatchDidFinishLoading(DocumentLoader* loader, unsigne
d long identifier, double finishTime, int64_t encodedDataLength) | 176 void FrameFetchContext::dispatchDidFinishLoading(DocumentLoader* loader, unsigne
d long identifier, double finishTime, int64_t encodedDataLength) |
| 177 { | 177 { |
| 178 m_frame->loader().progress().completeProgress(identifier); | 178 m_frame->loader().progress().completeProgress(identifier); |
| 179 m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier); | 179 m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier); |
| 180 | 180 |
| 181 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour
ceFinish", "data", InspectorResourceFinishEvent::data(identifier, finishTime, fa
lse)); | 181 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour
ceFinish", "data", InspectorResourceFinishEvent::data(identifier, finishTime, fa
lse)); |
| 182 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. | 182 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. |
| 183 InspectorInstrumentation::didFinishLoading(m_frame, identifier, ensureLoader
(loader), finishTime, encodedDataLength); | 183 InspectorInstrumentation::didFinishLoading(m_frame, identifier, ensureLoader
(loader), finishTime, encodedDataLength); |
| 184 } | 184 } |
| 185 | 185 |
| 186 void FrameFetchContext::dispatchDidFail(DocumentLoader* loader, unsigned long id
entifier, const ResourceError& error) | 186 void FrameFetchContext::dispatchDidFail(DocumentLoader* loader, unsigned long id
entifier, const ResourceError& error, bool isInternalRequest) |
| 187 { | 187 { |
| 188 m_frame->loader().progress().completeProgress(identifier); | 188 m_frame->loader().progress().completeProgress(identifier); |
| 189 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour
ceFinish", "data", InspectorResourceFinishEvent::data(identifier, 0, true)); | 189 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour
ceFinish", "data", InspectorResourceFinishEvent::data(identifier, 0, true)); |
| 190 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. | 190 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. |
| 191 InspectorInstrumentation::didFailLoading(m_frame, identifier, error); | 191 InspectorInstrumentation::didFailLoading(m_frame, identifier, error); |
| 192 // Notification to FrameConsole should come AFTER InspectorInstrumentation c
all, DevTools front-end relies on this. | 192 // Notification to FrameConsole should come AFTER InspectorInstrumentation c
all, DevTools front-end relies on this. |
| 193 m_frame->console().didFailLoading(identifier, error); | 193 if (!isInternalRequest) |
| 194 m_frame->console().didFailLoading(identifier, error); |
| 194 } | 195 } |
| 195 | 196 |
| 196 void FrameFetchContext::sendRemainingDelegateMessages(DocumentLoader* loader, un
signed long identifier, const ResourceResponse& response, int dataLength) | 197 void FrameFetchContext::sendRemainingDelegateMessages(DocumentLoader* loader, un
signed long identifier, const ResourceResponse& response, int dataLength) |
| 197 { | 198 { |
| 198 if (!response.isNull()) | 199 if (!response.isNull()) |
| 199 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); | 200 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); |
| 200 | 201 |
| 201 if (dataLength > 0) | 202 if (dataLength > 0) |
| 202 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength,
0); | 203 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength,
0); |
| 203 | 204 |
| 204 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0); | 205 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0); |
| 205 } | 206 } |
| 206 | 207 |
| 207 void FrameFetchContext::trace(Visitor* visitor) | 208 void FrameFetchContext::trace(Visitor* visitor) |
| 208 { | 209 { |
| 209 visitor->trace(m_frame); | 210 visitor->trace(m_frame); |
| 210 FetchContext::trace(visitor); | 211 FetchContext::trace(visitor); |
| 211 } | 212 } |
| 212 | 213 |
| 213 } // namespace blink | 214 } // namespace blink |
| OLD | NEW |