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

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

Issue 561813003: Prepare blink to unify definitions of load completion (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier); 184 m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier);
185 185
186 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceFinish", "data", InspectorResourceFinishEvent::data(identifier, finishTime, fa lse)); 186 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceFinish", "data", InspectorResourceFinishEvent::data(identifier, finishTime, fa lse));
187 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing. 187 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing.
188 InspectorInstrumentation::didFinishLoading(m_frame, identifier, ensureLoader (loader), finishTime, encodedDataLength); 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 m_frame->loader().progress().completeProgress(identifier); 193 m_frame->loader().progress().completeProgress(identifier);
194 m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier);
Nate Chapin 2014/09/15 23:39:35 We need to report resource load completion for bot
194 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceFinish", "data", InspectorResourceFinishEvent::data(identifier, 0, true)); 195 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceFinish", "data", InspectorResourceFinishEvent::data(identifier, 0, true));
195 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing. 196 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing.
196 InspectorInstrumentation::didFailLoading(m_frame, identifier, error); 197 InspectorInstrumentation::didFailLoading(m_frame, identifier, error);
197 } 198 }
198 199
199 void FrameFetchContext::sendRemainingDelegateMessages(DocumentLoader* loader, un signed long identifier, const ResourceResponse& response, int dataLength) 200 void FrameFetchContext::sendRemainingDelegateMessages(DocumentLoader* loader, un signed long identifier, const ResourceResponse& response, int dataLength)
200 { 201 {
201 if (!response.isNull()) 202 if (!response.isNull())
202 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); 203 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response);
203 204
204 if (dataLength > 0) 205 if (dataLength > 0)
205 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength, 0); 206 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength, 0);
206 207
207 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0); 208 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0);
208 } 209 }
209 210
210 } // namespace blink 211 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698