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

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, 2 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 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) 186 void FrameFetchContext::dispatchDidFail(DocumentLoader* loader, unsigned long id entifier, const ResourceError& error)
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 m_frame->console().didFailLoading(identifier, error); 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698