RemoteInspectionTarget.h [plain text]
#if ENABLE(REMOTE_INSPECTOR)
#ifndef RemoteInspectionTarget_h
#define RemoteInspectionTarget_h
#include "RemoteControllableTarget.h"
#include <wtf/RetainPtr.h>
#include <wtf/TypeCasts.h>
#include <wtf/text/WTFString.h>
namespace Inspector {
class FrontendChannel;
class JS_EXPORT_PRIVATE RemoteInspectionTarget : public RemoteControllableTarget {
public:
bool remoteDebuggingAllowed() const { return m_allowed; }
void setRemoteDebuggingAllowed(bool);
CFRunLoopRef targetRunLoop() override { return m_runLoop.get(); }
void setTargetRunLoop(CFRunLoopRef runLoop) { m_runLoop = runLoop; }
virtual String name() const { return String(); } virtual String url() const { return String(); } virtual bool hasLocalDebugger() const = 0;
virtual void setIndicating(bool) { } virtual void pause() { };
virtual bool automaticInspectionAllowed() const { return false; }
virtual void pauseWaitingForAutomaticInspection();
virtual void unpauseForInitializedInspector();
bool remoteControlAllowed() const override;
private:
bool m_allowed {false};
RetainPtr<CFRunLoopRef> m_runLoop;
};
}
SPECIALIZE_TYPE_TRAITS_BEGIN(Inspector::RemoteInspectionTarget) \
static bool isType(const Inspector::RemoteControllableTarget& target) \
{ \
return target.type() == Inspector::RemoteControllableTarget::Type::JavaScript \
|| target.type() == Inspector::RemoteControllableTarget::Type::Web; \
}
SPECIALIZE_TYPE_TRAITS_END()
#endif // RemoteInspectionTarget_h
#endif // ENABLE(REMOTE_INSPECTOR)