#ifndef InspectorInstrumentationCustom_inl_h
#define InspectorInstrumentationCustom_inl_h
namespace WebCore {
namespace InspectorInstrumentation {
bool isDebuggerPausedImpl(InstrumentingAgents*);
bool collectingHTMLParseErrorsImpl(InstrumentingAgents*);
PassOwnPtr<ScriptSourceCode> preprocessImpl(InstrumentingAgents*, LocalFrame*, const ScriptSourceCode&);
String preprocessEventListenerImpl(InstrumentingAgents*, LocalFrame*, const String& source, const String& url, const String& functionName);
bool canvasAgentEnabled(ExecutionContext*);
bool consoleAgentEnabled(ExecutionContext*);
bool timelineAgentEnabled(ExecutionContext*);
inline bool isDebuggerPaused(LocalFrame* frame)
{
FAST_RETURN_IF_NO_FRONTENDS(false);
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(frame))
return isDebuggerPausedImpl(instrumentingAgents);
return false;
}
inline bool collectingHTMLParseErrors(Page* page)
{
FAST_RETURN_IF_NO_FRONTENDS(false);
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(page))
return collectingHTMLParseErrorsImpl(instrumentingAgents);
return false;
}
inline String preprocessEventListener(LocalFrame* frame, const String& source, const String& url, const String& functionName)
{
FAST_RETURN_IF_NO_FRONTENDS(source);
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(frame))
return preprocessEventListenerImpl(instrumentingAgents, frame, source, url, functionName);
return source;
}
inline PassOwnPtr<ScriptSourceCode> preprocess(LocalFrame* frame, const ScriptSourceCode& sourceCode)
{
FAST_RETURN_IF_NO_FRONTENDS(PassOwnPtr<ScriptSourceCode>());
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(frame))
return preprocessImpl(instrumentingAgents, frame, sourceCode);
return PassOwnPtr<ScriptSourceCode>();
}
}
}
#endif