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

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

Issue 690793003: Threaded data provider: Support main thread data notifications (Blink side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Directly call InspectorInstrumentation::hasFrontends 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
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceReceiveResponse", "data", InspectorReceiveResponseEvent::data(identifier, m_fr ame, r)); 152 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceReceiveResponse", "data", InspectorReceiveResponseEvent::data(identifier, m_fr ame, r));
153 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing. 153 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing.
154 DocumentLoader* documentLoader = ensureLoader(loader); 154 DocumentLoader* documentLoader = ensureLoader(loader);
155 InspectorInstrumentation::didReceiveResourceResponse(m_frame, identifier, do cumentLoader, r, resourceLoader); 155 InspectorInstrumentation::didReceiveResourceResponse(m_frame, identifier, do cumentLoader, r, resourceLoader);
156 // It is essential that inspector gets resource response BEFORE console. 156 // It is essential that inspector gets resource response BEFORE console.
157 m_frame->console().reportResourceResponseReceived(documentLoader, identifier , r); 157 m_frame->console().reportResourceResponseReceived(documentLoader, identifier , r);
158 } 158 }
159 159
160 void FrameFetchContext::dispatchDidReceiveData(DocumentLoader*, unsigned long id entifier, const char* data, int dataLength, int encodedDataLength) 160 void FrameFetchContext::dispatchDidReceiveData(DocumentLoader*, unsigned long id entifier, const char* data, int dataLength, int encodedDataLength)
161 { 161 {
162 m_frame->loader().progress().incrementProgress(identifier, data, dataLength) ; 162 m_frame->loader().progress().incrementProgress(identifier, dataLength);
163 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceReceivedData", "data", InspectorReceiveDataEvent::data(identifier, m_frame, en codedDataLength)); 163 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceReceivedData", "data", InspectorReceiveDataEvent::data(identifier, m_frame, en codedDataLength));
164 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing. 164 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing.
165 InspectorInstrumentation::didReceiveData(m_frame, identifier, data, dataLeng th, encodedDataLength); 165 InspectorInstrumentation::didReceiveData(m_frame, identifier, data, dataLeng th, encodedDataLength);
166 } 166 }
167 167
168 void FrameFetchContext::dispatchDidDownloadData(DocumentLoader*, unsigned long i dentifier, int dataLength, int encodedDataLength) 168 void FrameFetchContext::dispatchDidDownloadData(DocumentLoader*, unsigned long i dentifier, int dataLength, int encodedDataLength)
169 { 169 {
170 m_frame->loader().progress().incrementProgress(identifier, 0, dataLength); 170 m_frame->loader().progress().incrementProgress(identifier, dataLength);
171 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceReceivedData", "data", InspectorReceiveDataEvent::data(identifier, m_frame, en codedDataLength)); 171 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour ceReceivedData", "data", InspectorReceiveDataEvent::data(identifier, m_frame, en codedDataLength));
172 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing. 172 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing.
173 InspectorInstrumentation::didReceiveData(m_frame, identifier, 0, dataLength, encodedDataLength); 173 InspectorInstrumentation::didReceiveData(m_frame, identifier, 0, dataLength, encodedDataLength);
174 } 174 }
175 175
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
(...skipping 25 matching lines...) Expand all
206 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0); 206 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0);
207 } 207 }
208 208
209 void FrameFetchContext::trace(Visitor* visitor) 209 void FrameFetchContext::trace(Visitor* visitor)
210 { 210 {
211 visitor->trace(m_frame); 211 visitor->trace(m_frame);
212 FetchContext::trace(visitor); 212 FetchContext::trace(visitor);
213 } 213 }
214 214
215 } // namespace blink 215 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698