Skip to content
  • yurys@chromium.org's avatar
    2011-05-06 Yury Semikhatsky <yurys@chromium.org> · a5236926
    yurys@chromium.org authored
            Reviewed by Pavel Feldman.
    
            Web Inspector: move agents from InspectorAgent to InspectorController
            https://bugs.webkit.org/show_bug.cgi?id=60359
    
            All inspector agents are now created and owned by InspectorController which
            in turned is owned by the inspected Page. InspectorInstrumentation gets access
            to the instrumenting agents by means of InspectorAgent::instrumentingAgents().
    
            In addition to managing inspector agents lifetime InspectorController sets
            InspectorFronted on the agents when the front-end is connected.
    
            * inspector/InspectorAgent.cpp:
            (WebCore::InspectorAgent::InspectorAgent):
            (WebCore::InspectorAgent::~InspectorAgent):
            (WebCore::InspectorAgent::inspectedPageDestroyed):
            (WebCore::InspectorAgent::restore):
            (WebCore::InspectorAgent::setFrontend):
            (WebCore::InspectorAgent::clearFrontend):
            * inspector/InspectorAgent.h: all accessors to other agents were removed along with
            the agents themselves from InspectorAgent. Every agent that depends on some other agents
            receives pointers to them explicitely in its constructor. All access to the agents
            from WebCore should go through InspectorInstrumentation which retrieves corresponding
            agents using InstrumentingAgents structure which represents the set of active agents.
            (WebCore::InspectorAgent::instrumentingAgents):
            * inspector/InspectorController.cpp:
            (WebCore::InspectorController::InspectorController):
            (WebCore::InspectorController::~InspectorController):
            (WebCore::InspectorController::inspectedPageDestroyed):
            (WebCore::InspectorController::startTimelineProfiler):
            (WebCore::InspectorController::stopTimelineProfiler):
            (WebCore::InspectorController::connectFrontend):
            (WebCore::InspectorController::disconnectFrontend):
            (WebCore::InspectorController::restoreInspectorStateFromCookie):
            (WebCore::InspectorController::drawNodeHighlight):
            (WebCore::InspectorController::inspect):
            (WebCore::InspectorController::timelineProfilerEnabled):
            (WebCore::InspectorController::hideHighlight):
            (WebCore::InspectorController::highlightedNode):
            (WebCore::InspectorController::enableProfiler):
            (WebCore::InspectorController::disableProfiler):
            (WebCore::InspectorController::profilerEnabled):
            (WebCore::InspectorController::debuggerEnabled):
            (WebCore::InspectorController::disableDebugger):
            (WebCore::InspectorController::startUserInitiatedProfiling):
            (WebCore::InspectorController::stopUserInitiatedProfiling):
            (WebCore::InspectorController::isRecordingUserInitiatedProfile):
            (WebCore::InspectorController::resume):
            * inspector/InspectorController.h:
            * inspector/InspectorInstrumentation.cpp:
            (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
            (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
            (WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
            (WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
            (WebCore::InspectorInstrumentation::characterDataModifiedImpl):
            (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
            (WebCore::InspectorInstrumentation::didFailLoadingImpl):
            (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
            (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
            (WebCore::InspectorInstrumentation::consoleCountImpl):
            (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
            (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
            (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
            (WebCore::InspectorInstrumentation::addProfileImpl):
            (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl):
            (WebCore::InspectorInstrumentation::profilerEnabledImpl):
            (WebCore::InspectorInstrumentation::cancelPauseOnNativeEvent):
            * page/Page.cpp:
            (WebCore::Page::~Page): we send two notifications when inspected Page is being
            destroyed: one to the inspector instrumentation and another one to the InspectorController
            which is owned by the Page.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    a5236926