This source file includes following definitions.
- appended
- m_inspectorState
- append
- setFrontend
- clearFrontend
- restore
- registerInDispatcher
- discardAgents
- flushPendingFrontendMessages
#include "config.h"
#include "core/inspector/InspectorBaseAgent.h"
#include "core/inspector/InspectorState.h"
#include "wtf/PassOwnPtr.h"
namespace WebCore {
InspectorAgent::InspectorAgent(const String& name)
: m_name(name)
{
}
InspectorAgent::~InspectorAgent()
{
}
void InspectorAgent::appended(InstrumentingAgents* instrumentingAgents, InspectorState* inspectorState)
{
m_instrumentingAgents = instrumentingAgents;
m_state = inspectorState;
init();
}
InspectorAgentRegistry::InspectorAgentRegistry(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* inspectorState)
: m_instrumentingAgents(instrumentingAgents)
, m_inspectorState(inspectorState)
{
}
void InspectorAgentRegistry::append(PassOwnPtr<InspectorAgent> agent)
{
agent->appended(m_instrumentingAgents, m_inspectorState->createAgentState(agent->name()));
m_agents.append(agent);
}
void InspectorAgentRegistry::setFrontend(InspectorFrontend* frontend)
{
for (size_t i = 0; i < m_agents.size(); i++)
m_agents[i]->setFrontend(frontend);
}
void InspectorAgentRegistry::clearFrontend()
{
for (size_t i = 0; i < m_agents.size(); i++)
m_agents[i]->clearFrontend();
}
void InspectorAgentRegistry::restore()
{
for (size_t i = 0; i < m_agents.size(); i++)
m_agents[i]->restore();
}
void InspectorAgentRegistry::registerInDispatcher(InspectorBackendDispatcher* dispatcher)
{
for (size_t i = 0; i < m_agents.size(); i++)
m_agents[i]->registerInDispatcher(dispatcher);
}
void InspectorAgentRegistry::discardAgents()
{
for (size_t i = 0; i < m_agents.size(); i++)
m_agents[i]->discardAgent();
}
void InspectorAgentRegistry::flushPendingFrontendMessages()
{
for (size_t i = 0; i < m_agents.size(); i++)
m_agents[i]->flushPendingFrontendMessages();
}
}