void InspectorAgent::setFrontend(InspectorFrontend* inspectorFrontend) { // We can reconnect to existing front-end -> unmute state. m_state->unmute(); m_frontend = inspectorFrontend; #if ENABLE(OFFLINE_WEB_APPLICATIONS) m_applicationCacheAgent->setFrontend(m_frontend); #endif m_pageAgent->setFrontend(m_frontend); m_domAgent->setFrontend(m_frontend); m_consoleAgent->setFrontend(m_frontend); m_timelineAgent->setFrontend(m_frontend); m_resourceAgent->setFrontend(m_frontend); #if ENABLE(JAVASCRIPT_DEBUGGER) m_debuggerAgent->setFrontend(m_frontend); m_profilerAgent->setFrontend(m_frontend); #endif #if ENABLE(DATABASE) m_databaseAgent->setFrontend(m_frontend); #endif #if ENABLE(DOM_STORAGE) m_domStorageAgent->setFrontend(m_frontend); #endif if (!m_showPanelAfterVisible.isEmpty()) { m_frontend->inspector()->showPanel(m_showPanelAfterVisible); m_showPanelAfterVisible = String(); } #if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(WORKERS) WorkersMap::iterator workersEnd = m_workers.end(); for (WorkersMap::iterator it = m_workers.begin(); it != workersEnd; ++it) { InspectorWorkerResource* worker = it->second.get(); m_frontend->inspector()->didCreateWorker(worker->id(), worker->url(), worker->isSharedWorker()); } #endif #if ENABLE(WORKERS) m_workerAgent->setFrontend(m_frontend); #endif // Dispatch pending frontend commands issueEvaluateForTestCommands(); }
void InspectorAgent::setFrontend(InspectorFrontend* inspectorFrontend) { m_frontend = inspectorFrontend; if (!m_showPanelAfterVisible.isEmpty()) { m_frontend->inspector()->showPanel(m_showPanelAfterVisible); m_showPanelAfterVisible = String(); } #if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(WORKERS) WorkersMap::iterator workersEnd = m_workers.end(); for (WorkersMap::iterator it = m_workers.begin(); it != workersEnd; ++it) { InspectorWorkerResource* worker = it->second.get(); m_frontend->inspector()->didCreateWorker(worker->id(), worker->url(), worker->isSharedWorker()); } #endif // Dispatch pending frontend commands issueEvaluateForTestCommands(); }
void InspectorAgent::evaluateForTestInFrontend(long callId, const String& script) { m_pendingEvaluateTestCommands.append(pair<long, String>(callId, script)); if (m_canIssueEvaluateForTestInFrontend) issueEvaluateForTestCommands(); }