InspectorInstrumentationCookie InspectorInstrumentation::willReceiveResourceDataImpl(InspectorController* inspectorController, unsigned long identifier) { int timelineAgentId = 0; InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); if (timelineAgent) { timelineAgent->willReceiveResourceData(identifier); timelineAgentId = timelineAgent->id(); } return InspectorInstrumentationCookie(inspectorController, timelineAgentId); }
void ResourceLoader::didReceiveData(ResourceHandle*, const char* data, int length, int lengthReceived) { #if ENABLE(INSPECTOR) if (InspectorTimelineAgent::instanceCount()) { InspectorTimelineAgent* timelineAgent = m_frame->page() ? m_frame->page()->inspectorTimelineAgent() : 0; if (timelineAgent) timelineAgent->willReceiveResourceData(identifier()); } #endif didReceiveData(data, length, lengthReceived, false); #if ENABLE(INSPECTOR) if (InspectorTimelineAgent::instanceCount()) { InspectorTimelineAgent* timelineAgent = m_frame->page() ? m_frame->page()->inspectorTimelineAgent() : 0; if (timelineAgent) timelineAgent->didReceiveResourceData(); } #endif }