summaryrefslogtreecommitdiff
path: root/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/inspector/InspectorDOMDebuggerAgent.h')
-rw-r--r--Source/WebCore/inspector/InspectorDOMDebuggerAgent.h80
1 files changed, 35 insertions, 45 deletions
diff --git a/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h b/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h
index ebe26650a..c10979577 100644
--- a/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h
+++ b/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,17 +29,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef InspectorDOMDebuggerAgent_h
-#define InspectorDOMDebuggerAgent_h
-
-#if ENABLE(INSPECTOR)
+#pragma once
#include "InspectorWebAgentBase.h"
-#include "InspectorWebBackendDispatchers.h"
+#include <inspector/InspectorBackendDispatchers.h>
#include <inspector/agents/InspectorDebuggerAgent.h>
#include <wtf/HashMap.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
namespace Inspector {
@@ -49,70 +45,64 @@ namespace WebCore {
class Element;
class InspectorDOMAgent;
-class InstrumentingAgents;
class Node;
typedef String ErrorString;
-class InspectorDOMDebuggerAgent : public InspectorAgentBase, public Inspector::InspectorDebuggerAgent::Listener, public Inspector::InspectorDOMDebuggerBackendDispatcherHandler {
+class InspectorDOMDebuggerAgent final : public InspectorAgentBase, public Inspector::InspectorDebuggerAgent::Listener, public Inspector::DOMDebuggerBackendDispatcherHandler {
WTF_MAKE_NONCOPYABLE(InspectorDOMDebuggerAgent);
+ WTF_MAKE_FAST_ALLOCATED;
public:
- InspectorDOMDebuggerAgent(InstrumentingAgents*, InspectorDOMAgent*, Inspector::InspectorDebuggerAgent*);
+ InspectorDOMDebuggerAgent(WebAgentContext&, InspectorDOMAgent*, Inspector::InspectorDebuggerAgent*);
virtual ~InspectorDOMDebuggerAgent();
// DOMDebugger API
- virtual void setXHRBreakpoint(ErrorString*, const String& url) override;
- virtual void removeXHRBreakpoint(ErrorString*, const String& url) override;
- virtual void setEventListenerBreakpoint(ErrorString*, const String& eventName) override;
- virtual void removeEventListenerBreakpoint(ErrorString*, const String& eventName) override;
- virtual void setInstrumentationBreakpoint(ErrorString*, const String& eventName) override;
- virtual void removeInstrumentationBreakpoint(ErrorString*, const String& eventName) override;
- virtual void setDOMBreakpoint(ErrorString*, int nodeId, const String& type) override;
- virtual void removeDOMBreakpoint(ErrorString*, int nodeId, const String& type) override;
-
- // InspectorInstrumentation API
- void willInsertDOMNode(Node* parent);
- void didInvalidateStyleAttr(Node*);
- void didInsertDOMNode(Node*);
- void willRemoveDOMNode(Node*);
- void didRemoveDOMNode(Node*);
- void willModifyDOMAttr(Element*);
+ void setXHRBreakpoint(ErrorString&, const String& url) override;
+ void removeXHRBreakpoint(ErrorString&, const String& url) override;
+ void setEventListenerBreakpoint(ErrorString&, const String& eventName) override;
+ void removeEventListenerBreakpoint(ErrorString&, const String& eventName) override;
+ void setInstrumentationBreakpoint(ErrorString&, const String& eventName) override;
+ void removeInstrumentationBreakpoint(ErrorString&, const String& eventName) override;
+ void setDOMBreakpoint(ErrorString&, int nodeId, const String& type) override;
+ void removeDOMBreakpoint(ErrorString&, int nodeId, const String& type) override;
+
+ // InspectorInstrumentation
+ void willInsertDOMNode(Node& parent);
+ void didInvalidateStyleAttr(Node&);
+ void didInsertDOMNode(Node&);
+ void willRemoveDOMNode(Node&);
+ void didRemoveDOMNode(Node&);
+ void willModifyDOMAttr(Element&);
void willSendXMLHttpRequest(const String& url);
void pauseOnNativeEventIfNeeded(bool isDOMEvent, const String& eventName, bool synchronous);
- virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
- virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
- virtual void discardAgent() override;
+ void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override;
+ void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override;
+ void discardAgent() override;
private:
// Inspector::InspectorDebuggerAgent::Listener implementation.
- virtual void debuggerWasEnabled() override;
- virtual void debuggerWasDisabled() override;
- virtual void stepInto() override;
- virtual void didPause() override;
+ void debuggerWasEnabled() override;
+ void debuggerWasDisabled() override;
void disable();
- void descriptionForDOMEvent(Node* target, int breakpointType, bool insertion, Inspector::InspectorObject* description);
+ void descriptionForDOMEvent(Node& target, int breakpointType, bool insertion, Inspector::InspectorObject& description);
void updateSubtreeBreakpoints(Node*, uint32_t rootMask, bool set);
bool hasBreakpoint(Node*, int type);
void discardBindings();
- void setBreakpoint(ErrorString*, const String& eventName);
- void removeBreakpoint(ErrorString*, const String& eventName);
+ void setBreakpoint(ErrorString&, const String& eventName);
+ void removeBreakpoint(ErrorString&, const String& eventName);
void clear();
- InspectorDOMAgent* m_domAgent;
- Inspector::InspectorDebuggerAgent* m_debuggerAgent;
- RefPtr<Inspector::InspectorDOMDebuggerBackendDispatcher> m_backendDispatcher;
+ RefPtr<Inspector::DOMDebuggerBackendDispatcher> m_backendDispatcher;
+ InspectorDOMAgent* m_domAgent { nullptr };
+ Inspector::InspectorDebuggerAgent* m_debuggerAgent { nullptr };
+
HashMap<Node*, uint32_t> m_domBreakpoints;
HashSet<String> m_eventListenerBreakpoints;
HashSet<String> m_xhrBreakpoints;
- bool m_pauseInNextEventListener;
- bool m_pauseOnAllXHRsEnabled;
+ bool m_pauseOnAllXHRsEnabled { false };
};
} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)
-
-#endif // !defined(InspectorDOMDebuggerAgent_h)