Exemple #1
0
void WebDevToolsAgentImpl::setApuAgentEnabled(bool enabled)
{
    m_apuAgentEnabled = enabled;
    InspectorController* ic = inspectorController();
    if (enabled) {
        if (!ic->hasFrontend())
            connectFrontend(true);
        m_resourceTrackingWasEnabled = ic->resourceTrackingEnabled();
        ic->startTimelineProfiler();
        if (!m_resourceTrackingWasEnabled) {
            // TODO(knorton): Introduce some kind of agents dependency here so that
            // user could turn off resource tracking while apu agent is on.
            ic->setResourceTrackingEnabled(true);
        }
        m_debuggerAgentImpl->setAutoContinueOnException(true);
    } else {
        ic->stopTimelineProfiler();
        if (!m_resourceTrackingWasEnabled)
            ic->setResourceTrackingEnabled(false);
        m_resourceTrackingWasEnabled = false;
    }
    m_client->runtimePropertyChanged(
        kApuAgentFeatureName,
        enabled ? String("true") : String("false"));
}
void InspectorController::reuseFrontend(const String& hostId, InspectorFrontendChannel* frontendChannel, const String& inspectorStateCookie)
{
    ASSERT(!m_inspectorFrontend);
    connectFrontend(hostId, frontendChannel);
    m_state->loadFromCookie(inspectorStateCookie);
    m_agents.restore();
}
Exemple #3
0
void InspectorController::restoreInspectorStateFromCookie(const String& inspectorStateCookie)
{
    ASSERT(!m_inspectorFrontend);
    connectFrontend();
    m_state->loadFromCookie(inspectorStateCookie);

    m_domAgent->restore();
    m_resourceAgent->restore();
    m_timelineAgent->restore();
    m_consoleAgent->restore();
#if ENABLE(SQL_DATABASE)
    m_databaseAgent->restore();
#endif
#if ENABLE(DOM_STORAGE)
    m_domStorageAgent->restore();
#endif
#if ENABLE(WORKERS)
    m_workerAgent->restore();
#endif
#if ENABLE(JAVASCRIPT_DEBUGGER)
    m_debuggerAgent->restore();
    m_profilerAgent->restore();
#endif
    m_inspectorAgent->restore();
}
void WorkerInspectorController::restoreInspectorStateFromCookie(const String& inspectorCookie)
{
    ASSERT(!m_frontend);
    connectFrontend();
    m_state->loadFromCookie(inspectorCookie);

    m_agents.restore();
}
void V8Inspector::restoreInspectorStateFromCookie(const String& inspectorCookie)
{
    ASSERT(!m_frontend);
    connectFrontend(nullptr);
    m_state->loadFromCookie(inspectorCookie);

    m_agents.restore();
}
void InspectorController::reconnectFrontend()
{
    if (!m_inspectorFrontend)
        return;
    InspectorFrontendChannel* frontendChannel = m_inspectorFrontend->channel();
    String hostId = m_hostId;
    disconnectFrontend();
    connectFrontend(hostId, frontendChannel);
}
Exemple #7
0
void InspectorController::restoreInspectorStateFromCookie(const String& inspectorStateCookie)
{
    ASSERT(!m_inspectorFrontend);
    connectFrontend();
    m_state->loadFromCookie(inspectorStateCookie);

    for (Agents::iterator it = m_agents.begin(); it != m_agents.end(); ++it)
        (*it)->restore();
}
Exemple #8
0
void WorkerInspectorController::restoreInspectorStateFromCookie(const String& inspectorCookie)
{
    ASSERT(!m_frontend);
    connectFrontend();
    m_state->loadFromCookie(inspectorCookie);

#if ENABLE(JAVASCRIPT_DEBUGGER)
    m_debuggerAgent->restore();
#endif
    m_consoleAgent->restore();
}
void InspectorController::show()
{
    ASSERT(!m_frontendRouter->hasRemoteFrontend());

    if (!enabled())
        return;

    if (m_frontendRouter->hasLocalFrontend())
        m_inspectorClient->bringFrontendToFront();
    else if (Inspector::FrontendChannel* frontendChannel = m_inspectorClient->openLocalFrontend(this))
        connectFrontend(frontendChannel);
}
Exemple #10
0
void InspectorController::show()
{
    if (!enabled())
        return;

    if (m_inspectorFrontend)
        m_inspectorClient->bringFrontendToFront();
    else {
        m_inspectorClient->openInspectorFrontend(this);
        connectFrontend();
    }
}
Exemple #11
0
void WebDevToolsAgentImpl::setRuntimeProperty(const WebString& name, const WebString& value)
{
    if (name == kApuAgentFeatureName)
        setApuAgentEnabled(value == "true");
    else if (name == kInspectorStateFeatureName) {
        InspectorController* ic = inspectorController();
        ic->restoreInspectorStateFromCookie(value);
    } else if (name == kFrontendConnectedFeatureName && !inspectorController()->hasFrontend()) {
        inspectorController()->injectedScriptHost()->setInjectedScriptSource(value);
        connectFrontend(true);
    }
}
Exemple #12
0
void InspectorController::show()
{
    ASSERT(!hasRemoteFrontend());

    if (!enabled())
        return;

    if (m_inspectorFrontendChannel)
        m_inspectorClient->bringFrontendToFront();
    else {
        InspectorFrontendChannel* frontendChannel = m_inspectorClient->openInspectorFrontend(this);
        if (frontendChannel)
            connectFrontend(frontendChannel);
    }
}
void InspectorController::show()
{
    ASSERT(!hasRemoteFrontend());

    if (!enabled())
        return;

    if (m_frontendChannel)
        m_inspectorClient->bringFrontendToFront();
    else {
        if (Inspector::FrontendChannel* frontendChannel = m_inspectorClient->openInspectorFrontend(this)) {
            bool isAutomaticInspection = false;
            connectFrontend(frontendChannel, isAutomaticInspection);
        }
    }
}
Exemple #14
0
void WebDevToolsAgentImpl::frontendLoaded()
{
    connectFrontend(false);
}