diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/inspector/InspectorDOMDebuggerAgent.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/inspector/InspectorDOMDebuggerAgent.h')
-rw-r--r-- | Source/WebCore/inspector/InspectorDOMDebuggerAgent.h | 80 |
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) |