#pragma once
#include <wtf/Forward.h>
#include <wtf/Optional.h>
namespace Inspector {
class FrontendChannel;
}
namespace WebCore {
class FloatRect;
class Frame;
class InspectorController;
class Page;
class InspectorClient {
public:
virtual ~InspectorClient() = default;
virtual void inspectedPageDestroyed() = 0;
virtual void frontendCountChanged(unsigned) { }
virtual Inspector::FrontendChannel* openLocalFrontend(InspectorController*) = 0;
virtual void bringFrontendToFront() = 0;
virtual void didResizeMainFrame(Frame*) { }
virtual void highlight() = 0;
virtual void hideHighlight() = 0;
virtual void showInspectorIndication() { }
virtual void hideInspectorIndication() { }
virtual bool overridesShowPaintRects() const { return false; }
virtual void setShowPaintRects(bool) { }
virtual void showPaintRect(const FloatRect&) { }
virtual void didSetSearchingForNode(bool) { }
virtual void elementSelectionChanged(bool) { }
virtual void timelineRecordingChanged(bool) { }
enum class DeveloperPreference {
AdClickAttributionDebugModeEnabled,
ITPDebugModeEnabled,
MockCaptureDevicesEnabled,
};
virtual void setDeveloperPreferenceOverride(DeveloperPreference, Optional<bool>) { }
#if ENABLE(REMOTE_INSPECTOR)
virtual bool allowRemoteInspectionToPageDirectly() const { return false; }
#endif
};
}
namespace WTF {
template<> struct EnumTraits<WebCore::InspectorClient::DeveloperPreference> {
using values = EnumValues<
WebCore::InspectorClient::DeveloperPreference,
WebCore::InspectorClient::DeveloperPreference::AdClickAttributionDebugModeEnabled,
WebCore::InspectorClient::DeveloperPreference::ITPDebugModeEnabled,
WebCore::InspectorClient::DeveloperPreference::MockCaptureDevicesEnabled
>;
};
}