InspectorTimelineAgent* InspectorInstrumentation::retrieveTimelineAgent(const InspectorInstrumentationCookie& cookie) { InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie.first); if (timelineAgent && timelineAgent->id() == cookie.second) return timelineAgent; return 0; }
void InspectorInstrumentation::didFinishLoadingImpl(InspectorController* ic, unsigned long identifier, double finishTime) { if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(ic)) timelineAgent->didFinishLoadingResource(identifier, false, finishTime); if (InspectorResourceAgent* resourceAgent = retrieveResourceAgent(ic)) resourceAgent->didFinishLoading(identifier, finishTime); }
void InspectorInstrumentation::willSendRequestImpl(InspectorAgent* inspectorAgent, unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse) { if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorAgent)) timelineAgent->willSendResourceRequest(identifier, request); if (InspectorResourceAgent* resourceAgent = retrieveResourceAgent(inspectorAgent)) resourceAgent->willSendRequest(identifier, request, redirectResponse); }
void InspectorInstrumentation::didDispatchEventOnWindowImpl(const InspectorInstrumentationCookie& cookie) { cancelPauseOnNativeEvent(cookie.first); if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) timelineAgent->didDispatchEvent(); }
void InspectorInstrumentation::didPaintImpl(const InspectorInstrumentationCookie& cookie) { if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) timelineAgent->didPaint(); if (InspectorPageAgent* pageAgent = cookie.first ? cookie.first->inspectorPageAgent() : 0) pageAgent->didPaint(); }
void InspectorInstrumentation::consoleMarkTimelineImpl(InspectorAgent* inspectorAgent, PassRefPtr<ScriptArguments> arguments) { if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorAgent)) { String message; arguments->getFirstArgumentAsString(message); timelineAgent->didMarkTimeline(message); } }
void InspectorInstrumentation::didFailLoadingImpl(InspectorAgent* inspectorAgent, unsigned long identifier, const ResourceError& error) { inspectorAgent->consoleAgent()->didFailLoading(identifier, error); if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorAgent)) timelineAgent->didFinishLoadingResource(identifier, true, 0); if (InspectorResourceAgent* resourceAgent = retrieveResourceAgent(inspectorAgent)) resourceAgent->didFailLoading(identifier, error); }
void InspectorInstrumentation::didReceiveResourceResponseImpl(const InspectorInstrumentationCookie& cookie, unsigned long identifier, DocumentLoader* loader, const ResourceResponse& response) { InspectorAgent* inspectorAgent = cookie.first; if (InspectorResourceAgent* resourceAgent = retrieveResourceAgent(inspectorAgent)) resourceAgent->didReceiveResponse(identifier, loader, response); inspectorAgent->consoleAgent()->didReceiveResponse(identifier, response); if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) timelineAgent->didReceiveResourceResponse(); }
void InspectorInstrumentation::didFailLoadingImpl(InspectorController* ic, unsigned long identifier, const ResourceError& error) { // FIXME(52282): move this to console agent. ic->didFailLoading(identifier, error); if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(ic)) timelineAgent->didFinishLoadingResource(identifier, true, 0); if (InspectorResourceAgent* resourceAgent = retrieveResourceAgent(ic)) resourceAgent->didFailLoading(identifier, error); }
InspectorInstrumentationCookie InspectorInstrumentation::willReceiveResourceResponseImpl(InspectorController* inspectorController, unsigned long identifier, const ResourceResponse& response) { int timelineAgentId = 0; InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); if (timelineAgent) { timelineAgent->willReceiveResourceResponse(identifier, response); timelineAgentId = timelineAgent->id(); } return InspectorInstrumentationCookie(inspectorController, timelineAgentId); }
void InspectorInstrumentation::didReceiveResourceResponseImpl(const InspectorInstrumentationCookie& cookie, unsigned long identifier, DocumentLoader* loader, const ResourceResponse& response) { InspectorController* ic = cookie.first; if (InspectorResourceAgent* resourceAgent = retrieveResourceAgent(ic)) resourceAgent->didReceiveResponse(identifier, loader, response); // FIXME(52282): move this to console agent. ic->didReceiveResponse(identifier, response); if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) timelineAgent->didReceiveResourceResponse(); }
InspectorInstrumentationCookie InspectorInstrumentation::willReceiveResourceDataImpl(InspectorAgent* inspectorAgent, unsigned long identifier) { int timelineAgentId = 0; InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorAgent); if (timelineAgent) { timelineAgent->willReceiveResourceData(identifier); timelineAgentId = timelineAgent->id(); } return InspectorInstrumentationCookie(inspectorAgent, timelineAgentId); }
InspectorInstrumentationCookie InspectorInstrumentation::willRecalculateStyleImpl(InspectorController* inspectorController) { int timelineAgentId = 0; InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); if (timelineAgent) { timelineAgent->willRecalculateStyle(); timelineAgentId = timelineAgent->id(); } return InspectorInstrumentationCookie(inspectorController, timelineAgentId); }
InspectorInstrumentationCookie InspectorInstrumentation::willCallFunctionImpl(InspectorController* inspectorController, const String& scriptName, int scriptLine) { int timelineAgentId = 0; InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); if (timelineAgent) { timelineAgent->willCallFunction(scriptName, scriptLine); timelineAgentId = timelineAgent->id(); } return InspectorInstrumentationCookie(inspectorController, timelineAgentId); }
InspectorInstrumentationCookie InspectorInstrumentation::willPaintImpl(InspectorController* inspectorController, const IntRect& rect) { int timelineAgentId = 0; InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); if (timelineAgent) { timelineAgent->willPaint(rect); timelineAgentId = timelineAgent->id(); } return InspectorInstrumentationCookie(inspectorController, timelineAgentId); }
InspectorInstrumentationCookie InspectorInstrumentation::willLoadXHRImpl(InspectorController* inspectorController, XMLHttpRequest* request) { int timelineAgentId = 0; InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); if (timelineAgent && request->hasEventListeners(eventNames().loadEvent)) { timelineAgent->willLoadXHR(request->url()); timelineAgentId = timelineAgent->id(); } return InspectorInstrumentationCookie(inspectorController, timelineAgentId); }
InspectorInstrumentationCookie InspectorInstrumentation::willChangeXHRReadyStateImpl(InspectorController* inspectorController, XMLHttpRequest* request) { int timelineAgentId = 0; InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); if (timelineAgent && request->hasEventListeners(eventNames().readystatechangeEvent)) { timelineAgent->willChangeXHRReadyState(request->url().string(), request->readyState()); timelineAgentId = timelineAgent->id(); } return InspectorInstrumentationCookie(inspectorController, timelineAgentId); }
InspectorInstrumentationCookie InspectorInstrumentation::willEvaluateScriptImpl(InspectorController* inspectorController, const String& url, int lineNumber) { int timelineAgentId = 0; InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); if (timelineAgent) { timelineAgent->willEvaluateScript(url, lineNumber); timelineAgentId = timelineAgent->id(); } return InspectorInstrumentationCookie(inspectorController, timelineAgentId); }
InspectorInstrumentationCookie InspectorInstrumentation::willWriteHTMLImpl(InspectorController* inspectorController, unsigned int length, unsigned int startLine) { int timelineAgentId = 0; InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); if (timelineAgent) { timelineAgent->willWriteHTML(length, startLine); timelineAgentId = timelineAgent->id(); } return InspectorInstrumentationCookie(inspectorController, timelineAgentId); }
InspectorInstrumentationCookie InspectorInstrumentation::willLayoutImpl(InspectorAgent* inspectorAgent) { int timelineAgentId = 0; InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorAgent); if (timelineAgent) { timelineAgent->willLayout(); timelineAgentId = timelineAgent->id(); } return InspectorInstrumentationCookie(inspectorAgent, timelineAgentId); }
void InspectorInstrumentation::didRecalculateStyleImpl(const InspectorInstrumentationCookie& cookie) { if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) timelineAgent->didRecalculateStyle(); InstrumentingAgents* instrumentingAgents = cookie.first; if (!instrumentingAgents) return; if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent()) resourceAgent->didRecalculateStyle(); }
void InspectorInstrumentation::didLayoutImpl(const InspectorInstrumentationCookie& cookie) { if (!cookie.first) return; if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) timelineAgent->didLayout(); if (InspectorPageAgent* pageAgent = cookie.first->inspectorPageAgent()) pageAgent->didLayout(); }
InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventImpl(InspectorController* inspectorController, const Event& event, DOMWindow* window, Node* node, const Vector<EventContext>& ancestors) { pauseOnNativeEventIfNeeded(inspectorController, listenerEventCategoryType, event.type(), false); int timelineAgentId = 0; InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); if (timelineAgent && eventHasListeners(event.type(), window, node, ancestors)) { timelineAgent->willDispatchEvent(event); timelineAgentId = timelineAgent->id(); } return InspectorInstrumentationCookie(inspectorController, timelineAgentId); }
InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventOnWindowImpl(InspectorController* inspectorController, const Event& event, DOMWindow* window) { pauseOnNativeEventIfNeeded(inspectorController, listenerEventCategoryType, event.type(), false); int timelineAgentId = 0; InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); if (timelineAgent && window->hasEventListeners(event.type())) { timelineAgent->willDispatchEvent(event); timelineAgentId = timelineAgent->id(); } return InspectorInstrumentationCookie(inspectorController, timelineAgentId); }
InspectorInstrumentationCookie InspectorInstrumentation::willFireTimerImpl(InspectorController* inspectorController, int timerId) { pauseOnNativeEventIfNeeded(inspectorController, instrumentationEventCategoryType, timerFiredEventName, false); int timelineAgentId = 0; InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); if (timelineAgent) { timelineAgent->willFireTimer(timerId); timelineAgentId = timelineAgent->id(); } return InspectorInstrumentationCookie(inspectorController, timelineAgentId); }
void InspectorInstrumentation::didReceiveResourceResponseImpl(const InspectorInstrumentationCookie& cookie, unsigned long identifier, DocumentLoader* loader, const ResourceResponse& response) { if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) timelineAgent->didReceiveResourceResponse(); if (!loader) return; InstrumentingAgents* instrumentingAgents = cookie.first; if (!instrumentingAgents) return; if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent()) resourceAgent->didReceiveResponse(identifier, loader, response); if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent()) consoleAgent->didReceiveResponse(identifier, response); // This should come AFTER resource notification, front-end relies on this. }
void InspectorInstrumentation::didWriteHTMLImpl(const InspectorInstrumentationCookie& cookie, unsigned int endLine) { if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) timelineAgent->didWriteHTML(endLine); }
void InspectorInstrumentation::didReceiveResourceDataImpl(const InspectorInstrumentationCookie& cookie) { if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) timelineAgent->didReceiveResourceData(); }
void InspectorInstrumentation::didPaintImpl(const InspectorInstrumentationCookie& cookie) { if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) timelineAgent->didPaint(); }
void InspectorInstrumentation::didChangeXHRReadyStateImpl(const InspectorInstrumentationCookie& cookie) { if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) timelineAgent->didChangeXHRReadyState(); }