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

Side by Side Diff: Source/core/loader/FrameFetchContext.cpp

Issue 695943002: Reland "Prepare blink to unify definitions of load completion" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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/fetch/ResourceLoaderHost.h ('k') | Source/core/loader/FrameLoader.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) 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, bool isInternalRequest) 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 m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier);
189 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceFinish", "data", InspectorResourceFinishEvent::data(identifier, 0, true)); 190 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. 191 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing.
191 InspectorInstrumentation::didFailLoading(m_frame, identifier, error); 192 InspectorInstrumentation::didFailLoading(m_frame, identifier, error);
192 // Notification to FrameConsole should come AFTER InspectorInstrumentation c all, DevTools front-end relies on this. 193 // Notification to FrameConsole should come AFTER InspectorInstrumentation c all, DevTools front-end relies on this.
193 if (!isInternalRequest) 194 if (!isInternalRequest)
194 m_frame->console().didFailLoading(identifier, error); 195 m_frame->console().didFailLoading(identifier, error);
195 } 196 }
196 197
197 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)
198 { 199 {
199 if (!response.isNull()) 200 if (!response.isNull())
200 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); 201 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response);
201 202
202 if (dataLength > 0) 203 if (dataLength > 0)
203 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength, 0); 204 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength, 0);
204 205
205 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0); 206 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0);
206 } 207 }
207 208
208 void FrameFetchContext::trace(Visitor* visitor) 209 void FrameFetchContext::trace(Visitor* visitor)
209 { 210 {
210 visitor->trace(m_frame); 211 visitor->trace(m_frame);
211 FetchContext::trace(visitor); 212 FetchContext::trace(visitor);
212 } 213 }
213 214
214 } // namespace blink 215 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceLoaderHost.h ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698