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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour
ceReceiveResponse", "data", InspectorReceiveResponseEvent::data(identifier, m_fr
ame, r)); | 151 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour
ceReceiveResponse", "data", InspectorReceiveResponseEvent::data(identifier, m_fr
ame, r)); |
152 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. | 152 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. |
153 DocumentLoader* documentLoader = ensureLoader(loader); | 153 DocumentLoader* documentLoader = ensureLoader(loader); |
154 InspectorInstrumentation::didReceiveResourceResponse(m_frame, identifier, do
cumentLoader, r, resourceLoader); | 154 InspectorInstrumentation::didReceiveResourceResponse(m_frame, identifier, do
cumentLoader, r, resourceLoader); |
155 // It is essential that inspector gets resource response BEFORE console. | 155 // It is essential that inspector gets resource response BEFORE console. |
156 m_frame->console().reportResourceResponseReceived(documentLoader, identifier
, r); | 156 m_frame->console().reportResourceResponseReceived(documentLoader, identifier
, r); |
157 } | 157 } |
158 | 158 |
159 void FrameFetchContext::dispatchDidReceiveData(DocumentLoader*, unsigned long id
entifier, const char* data, int dataLength, int encodedDataLength) | 159 void FrameFetchContext::dispatchDidReceiveData(DocumentLoader*, unsigned long id
entifier, const char* data, int dataLength, int encodedDataLength) |
160 { | 160 { |
161 m_frame->loader().progress().incrementProgress(identifier, data, dataLength)
; | 161 m_frame->loader().progress().incrementProgress(identifier, dataLength); |
162 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour
ceReceivedData", "data", InspectorReceiveDataEvent::data(identifier, m_frame, en
codedDataLength)); | 162 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour
ceReceivedData", "data", InspectorReceiveDataEvent::data(identifier, m_frame, en
codedDataLength)); |
163 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. | 163 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. |
164 InspectorInstrumentation::didReceiveData(m_frame, identifier, data, dataLeng
th, encodedDataLength); | 164 InspectorInstrumentation::didReceiveData(m_frame, identifier, data, dataLeng
th, encodedDataLength); |
165 } | 165 } |
166 | 166 |
167 void FrameFetchContext::dispatchDidDownloadData(DocumentLoader*, unsigned long i
dentifier, int dataLength, int encodedDataLength) | 167 void FrameFetchContext::dispatchDidDownloadData(DocumentLoader*, unsigned long i
dentifier, int dataLength, int encodedDataLength) |
168 { | 168 { |
169 m_frame->loader().progress().incrementProgress(identifier, 0, dataLength); | 169 m_frame->loader().progress().incrementProgress(identifier, dataLength); |
170 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour
ceReceivedData", "data", InspectorReceiveDataEvent::data(identifier, m_frame, en
codedDataLength)); | 170 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Resour
ceReceivedData", "data", InspectorReceiveDataEvent::data(identifier, m_frame, en
codedDataLength)); |
171 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. | 171 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. |
172 InspectorInstrumentation::didReceiveData(m_frame, identifier, 0, dataLength,
encodedDataLength); | 172 InspectorInstrumentation::didReceiveData(m_frame, identifier, 0, dataLength,
encodedDataLength); |
173 } | 173 } |
174 | 174 |
175 void FrameFetchContext::dispatchDidFinishLoading(DocumentLoader* loader, unsigne
d long identifier, double finishTime, int64_t encodedDataLength) | 175 void FrameFetchContext::dispatchDidFinishLoading(DocumentLoader* loader, unsigne
d long identifier, double finishTime, int64_t encodedDataLength) |
176 { | 176 { |
177 m_frame->loader().progress().completeProgress(identifier); | 177 m_frame->loader().progress().completeProgress(identifier); |
178 m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier); | 178 m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier); |
179 | 179 |
(...skipping 25 matching lines...) Expand all Loading... |
205 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0); | 205 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0); |
206 } | 206 } |
207 | 207 |
208 void FrameFetchContext::trace(Visitor* visitor) | 208 void FrameFetchContext::trace(Visitor* visitor) |
209 { | 209 { |
210 visitor->trace(m_frame); | 210 visitor->trace(m_frame); |
211 FetchContext::trace(visitor); | 211 FetchContext::trace(visitor); |
212 } | 212 } |
213 | 213 |
214 } // namespace blink | 214 } // namespace blink |
OLD | NEW |