X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..HEAD:/inspector/agents/InspectorAgent.h diff --git a/inspector/agents/InspectorAgent.h b/inspector/agents/InspectorAgent.h index 1d30e2e..4c6ef78 100644 --- a/inspector/agents/InspectorAgent.h +++ b/inspector/agents/InspectorAgent.h @@ -30,49 +30,54 @@ #ifndef InspectorAgent_h #define InspectorAgent_h -#if ENABLE(INSPECTOR) - -#include "InspectorJSBackendDispatchers.h" -#include "InspectorJSFrontendDispatchers.h" +#include "InspectorBackendDispatchers.h" +#include "InspectorFrontendDispatchers.h" #include "inspector/InspectorAgentBase.h" #include #include namespace Inspector { +class BackendDispatcher; +class InspectorEnvironment; class InspectorObject; -class InstrumentingAgents; -class InspectorInspectorBackendDispatcher; -class InspectorInspectorFrontendDispatchers; typedef String ErrorString; -class JS_EXPORT_PRIVATE InspectorAgent final : public InspectorAgentBase, public InspectorInspectorBackendDispatcherHandler { +class JS_EXPORT_PRIVATE InspectorAgent final : public InspectorAgentBase, public InspectorBackendDispatcherHandler { WTF_MAKE_NONCOPYABLE(InspectorAgent); WTF_MAKE_FAST_ALLOCATED; public: - InspectorAgent(); + InspectorAgent(InspectorEnvironment&); virtual ~InspectorAgent(); - virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) override; - virtual void willDestroyFrontendAndBackend(InspectorDisconnectReason reason) override; + virtual void didCreateFrontendAndBackend(FrontendChannel*, BackendDispatcher*) override; + virtual void willDestroyFrontendAndBackend(DisconnectReason) override; - virtual void enable(ErrorString*) override; - virtual void disable(ErrorString*) override; + virtual void enable(ErrorString&) override; + virtual void disable(ErrorString&) override; + virtual void initialized(ErrorString&) override; - void inspect(PassRefPtr objectToInspect, PassRefPtr hints); + void inspect(RefPtr&& objectToInspect, RefPtr&& hints); void evaluateForTestInFrontend(const String& script); +#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) + void activateExtraDomain(const String&); + void activateExtraDomains(const Vector&); +#endif + private: - std::unique_ptr m_frontendDispatcher; - RefPtr m_backendDispatcher; + InspectorEnvironment& m_environment; + std::unique_ptr m_frontendDispatcher; + RefPtr m_backendDispatcher; Vector m_pendingEvaluateTestCommands; - std::pair, RefPtr> m_pendingInspectData; + std::pair, RefPtr> m_pendingInspectData; +#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) + RefPtr> m_pendingExtraDomainsData; +#endif bool m_enabled; }; } // namespace Inspector -#endif // ENABLE(INSPECTOR) - #endif // !defined(InspectorAgent_h)