InspectorDOMDebuggerAgent.h [plain text]
#ifndef InspectorDOMDebuggerAgent_h
#define InspectorDOMDebuggerAgent_h
#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
#include "InspectorDebuggerAgent.h"
#include "PlatformString.h"
#include <wtf/HashMap.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
class Element;
class InspectorAgent;
class InspectorDOMAgent;
class InspectorDebuggerAgent;
class InspectorFrontend;
class InspectorObject;
class InspectorState;
class InstrumentingAgents;
class Node;
typedef String ErrorString;
class InspectorDOMDebuggerAgent : public InspectorDebuggerAgent::Listener {
WTF_MAKE_NONCOPYABLE(InspectorDOMDebuggerAgent);
public:
static PassOwnPtr<InspectorDOMDebuggerAgent> create(InstrumentingAgents*, InspectorState*, InspectorDOMAgent*, InspectorDebuggerAgent*, InspectorAgent*);
virtual ~InspectorDOMDebuggerAgent();
void clearFrontend();
void setXHRBreakpoint(ErrorString*, const String& url);
void removeXHRBreakpoint(ErrorString*, const String& url);
void setEventListenerBreakpoint(ErrorString*, const String& eventName);
void removeEventListenerBreakpoint(ErrorString*, const String& eventName);
void setDOMBreakpoint(ErrorString*, int nodeId, int type);
void removeDOMBreakpoint(ErrorString*, int nodeId, int type);
void willInsertDOMNode(Node*, Node* parent);
void didInsertDOMNode(Node*);
void willRemoveDOMNode(Node*);
void didRemoveDOMNode(Node*);
void willModifyDOMAttr(Element*);
void willSendXMLHttpRequest(const String& url);
void pauseOnNativeEventIfNeeded(const String& categoryType, const String& eventName, bool synchronous);
void discardAgent();
private:
InspectorDOMDebuggerAgent(InstrumentingAgents*, InspectorState*, InspectorDOMAgent*, InspectorDebuggerAgent*, InspectorAgent*);
virtual void debuggerWasEnabled();
virtual void debuggerWasDisabled();
void disable();
void descriptionForDOMEvent(Node* target, int breakpointType, bool insertion, InspectorObject* description);
void updateSubtreeBreakpoints(Node*, uint32_t rootMask, bool set);
bool hasBreakpoint(Node*, int type);
void discardBindings();
void clear();
InstrumentingAgents* m_instrumentingAgents;
InspectorState* m_inspectorState;
InspectorDOMAgent* m_domAgent;
InspectorDebuggerAgent* m_debuggerAgent;
InspectorAgent* m_inspectorAgent;
HashMap<Node*, uint32_t> m_domBreakpoints;
};
}
#endif // ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
#endif // !defined(InspectorDOMDebuggerAgent_h)