#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 <wtf/Forward.h>
#include <wtf/Vector.h>
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<TypeBuilder::Runtime::RemoteObject> objectToInspect, PassRefPtr<InspectorObject> hints);
+ void inspect(RefPtr<Protocol::Runtime::RemoteObject>&& objectToInspect, RefPtr<InspectorObject>&& hints);
void evaluateForTestInFrontend(const String& script);
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ void activateExtraDomain(const String&);
+ void activateExtraDomains(const Vector<String>&);
+#endif
+
private:
- std::unique_ptr<InspectorInspectorFrontendDispatcher> m_frontendDispatcher;
- RefPtr<InspectorInspectorBackendDispatcher> m_backendDispatcher;
+ InspectorEnvironment& m_environment;
+ std::unique_ptr<InspectorFrontendDispatcher> m_frontendDispatcher;
+ RefPtr<InspectorBackendDispatcher> m_backendDispatcher;
Vector<String> m_pendingEvaluateTestCommands;
- std::pair<RefPtr<TypeBuilder::Runtime::RemoteObject>, RefPtr<InspectorObject>> m_pendingInspectData;
+ std::pair<RefPtr<Protocol::Runtime::RemoteObject>, RefPtr<InspectorObject>> m_pendingInspectData;
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+ RefPtr<Inspector::Protocol::Array<String>> m_pendingExtraDomainsData;
+#endif
bool m_enabled;
};
} // namespace Inspector
-#endif // ENABLE(INSPECTOR)
-
#endif // !defined(InspectorAgent_h)