WorkerInspectorController.h [plain text]
#ifndef WorkerInspectorController_h
#define WorkerInspectorController_h
#if ENABLE(INSPECTOR) && ENABLE(WORKERS)
#include "InspectorBaseAgent.h"
#include <wtf/FastAllocBase.h>
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
#include <wtf/OwnPtr.h>
#include <wtf/RefPtr.h>
namespace WebCore {
class InjectedScriptManager;
class InspectorBackendDispatcher;
class InspectorFrontend;
class InspectorFrontendChannel;
class InspectorInstrumentation;
class InspectorRuntimeAgent;
class InspectorState;
class InspectorStateClient;
class InstrumentingAgents;
class WorkerContext;
class WorkerInspectorController {
WTF_MAKE_NONCOPYABLE(WorkerInspectorController);
WTF_MAKE_FAST_ALLOCATED;
public:
WorkerInspectorController(WorkerContext*);
~WorkerInspectorController();
bool hasFrontend() const { return m_frontend; }
void connectFrontend();
void disconnectFrontend();
void restoreInspectorStateFromCookie(const String& inspectorCookie);
void dispatchMessageFromFrontend(const String&);
#if ENABLE(JAVASCRIPT_DEBUGGER)
void resume();
#endif
private:
friend InstrumentingAgents* instrumentationForWorkerContext(WorkerContext*);
WorkerContext* m_workerContext;
OwnPtr<InspectorStateClient> m_stateClient;
OwnPtr<InspectorCompositeState> m_state;
RefPtr<InstrumentingAgents> m_instrumentingAgents;
OwnPtr<InjectedScriptManager> m_injectedScriptManager;
InspectorRuntimeAgent* m_runtimeAgent;
InspectorAgentRegistry m_agents;
OwnPtr<InspectorFrontendChannel> m_frontendChannel;
OwnPtr<InspectorFrontend> m_frontend;
RefPtr<InspectorBackendDispatcher> m_backendDispatcher;
};
}
#endif // ENABLE(WORKERS)
#endif // !defined(WorkerInspectorController_h)