diff options
Diffstat (limited to 'Source/WebCore/inspector/InspectorInstrumentation.cpp')
-rw-r--r-- | Source/WebCore/inspector/InspectorInstrumentation.cpp | 45 |
1 files changed, 15 insertions, 30 deletions
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp index 81dded3e0..eb06071e4 100644 --- a/Source/WebCore/inspector/InspectorInstrumentation.cpp +++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp @@ -46,7 +46,6 @@ #include "InspectorApplicationCacheAgent.h" #include "InspectorDOMDebuggerAgent.h" #include "InspectorCSSAgent.h" -#include "InspectorCanvasAgent.h" #include "InspectorConsoleAgent.h" #include "InspectorController.h" #include "WorkerInspectorController.h" @@ -262,13 +261,6 @@ void InspectorInstrumentation::didScrollImpl(InstrumentingAgents* instrumentingA pageAgent->didScroll(); } -bool InspectorInstrumentation::handleTouchEventImpl(InstrumentingAgents* instrumentingAgents, Node* node) -{ - if (InspectorDOMAgent* domAgent = instrumentingAgents->inspectorDOMAgent()) - return domAgent->handleTouchEvent(node); - return false; -} - bool InspectorInstrumentation::handleMousePressImpl(InstrumentingAgents* instrumentingAgents) { if (InspectorDOMAgent* domAgent = instrumentingAgents->inspectorDOMAgent()) @@ -753,7 +745,7 @@ void InspectorInstrumentation::didFinishLoadingImpl(InstrumentingAgents* instrum double finishTime = 0.0; // FIXME: Expose all of the timing details to inspector and have it calculate finishTime. if (monotonicFinishTime) - finishTime = loader->timing()->monotonicTimeToPseudoWallTime(monotonicFinishTime); + finishTime = loader->timing()->convertMonotonicTimeToDocumentTime(monotonicFinishTime); if (timelineAgent) timelineAgent->didFinishLoadingResource(identifier, false, finishTime, loader->frame()); @@ -1142,30 +1134,23 @@ bool InspectorInstrumentation::collectingHTMLParseErrors(InstrumentingAgents* in return false; } -bool InspectorInstrumentation::canvasAgentEnabled(ScriptExecutionContext* scriptExecutionContext) +bool InspectorInstrumentation::hasFrontendForScriptContext(ScriptExecutionContext* scriptExecutionContext) { - InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext); - return instrumentingAgents && instrumentingAgents->inspectorCanvasAgent(); -} + if (!scriptExecutionContext) + return false; -bool InspectorInstrumentation::consoleAgentEnabled(ScriptExecutionContext* scriptExecutionContext) -{ - InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext); - InspectorConsoleAgent* consoleAgent = instrumentingAgents ? instrumentingAgents->inspectorConsoleAgent() : 0; - return consoleAgent && consoleAgent->enabled(); -} - -bool InspectorInstrumentation::runtimeAgentEnabled(Frame* frame) -{ - InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame); - InspectorRuntimeAgent* runtimeAgent = instrumentingAgents ? instrumentingAgents->inspectorRuntimeAgent() : 0; - return runtimeAgent && runtimeAgent->enabled(); -} +#if ENABLE(WORKERS) + if (scriptExecutionContext->isWorkerContext()) { + WorkerContext* workerContext = static_cast<WorkerContext*>(scriptExecutionContext); + WorkerInspectorController* workerInspectorController = workerContext->workerInspectorController(); + return workerInspectorController && workerInspectorController->hasFrontend(); + } +#endif -bool InspectorInstrumentation::timelineAgentEnabled(ScriptExecutionContext* scriptExecutionContext) -{ - InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext); - return instrumentingAgents && instrumentingAgents->inspectorTimelineAgent(); + ASSERT(scriptExecutionContext->isDocument()); + Document* document = static_cast<Document*>(scriptExecutionContext); + Page* page = document->page(); + return page && page->inspectorController()->hasFrontend(); } void InspectorInstrumentation::pauseOnNativeEventIfNeeded(InstrumentingAgents* instrumentingAgents, bool isDOMEvent, const String& eventName, bool synchronous) |