| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef InspectorDOMDebuggerAgent_h | 31 #ifndef InspectorDOMDebuggerAgent_h |
| 32 #define InspectorDOMDebuggerAgent_h | 32 #define InspectorDOMDebuggerAgent_h |
| 33 | 33 |
| 34 | 34 |
| 35 #include "core/CoreExport.h" | 35 #include "core/CoreExport.h" |
| 36 #include "core/inspector/InspectorBaseAgent.h" | 36 #include "core/inspector/InspectorBaseAgent.h" |
| 37 #include "core/inspector/InspectorDOMAgent.h" | 37 #include "core/inspector/InspectorDOMAgent.h" |
| 38 #include "core/inspector/InspectorDebuggerAgent.h" | |
| 39 #include "wtf/HashMap.h" | 38 #include "wtf/HashMap.h" |
| 40 #include "wtf/PassOwnPtr.h" | 39 #include "wtf/PassOwnPtr.h" |
| 41 #include "wtf/text/WTFString.h" | 40 #include "wtf/text/WTFString.h" |
| 42 | 41 |
| 43 namespace blink { | 42 namespace blink { |
| 44 | 43 |
| 45 class Element; | 44 class Element; |
| 46 class Event; | 45 class Event; |
| 47 class EventListener; | 46 class EventListener; |
| 48 class EventTarget; | 47 class EventTarget; |
| 49 class InjectedScriptManager; | 48 class InjectedScriptManager; |
| 50 class InspectorDebuggerAgent; | |
| 51 class InspectorDOMAgent; | 49 class InspectorDOMAgent; |
| 52 class JSONObject; | 50 class JSONObject; |
| 53 class Node; | 51 class Node; |
| 54 class RegisteredEventListener; | 52 class RegisteredEventListener; |
| 53 class V8DebuggerAgent; |
| 55 | 54 |
| 56 typedef String ErrorString; | 55 typedef String ErrorString; |
| 57 | 56 |
| 58 class CORE_EXPORT InspectorDOMDebuggerAgent final | 57 class CORE_EXPORT InspectorDOMDebuggerAgent final |
| 59 : public InspectorBaseAgent<InspectorDOMDebuggerAgent, InspectorFrontend::DO
MDebugger> | 58 : public InspectorBaseAgent<InspectorDOMDebuggerAgent, InspectorFrontend::DO
MDebugger> |
| 60 , public InspectorBackendDispatcher::DOMDebuggerCommandHandler { | 59 , public InspectorBackendDispatcher::DOMDebuggerCommandHandler { |
| 61 WTF_MAKE_NONCOPYABLE(InspectorDOMDebuggerAgent); | 60 WTF_MAKE_NONCOPYABLE(InspectorDOMDebuggerAgent); |
| 62 public: | 61 public: |
| 63 static PassOwnPtrWillBeRawPtr<InspectorDOMDebuggerAgent> create(InjectedScri
ptManager*, InspectorDOMAgent*, InspectorDebuggerAgent*); | 62 static PassOwnPtrWillBeRawPtr<InspectorDOMDebuggerAgent> create(InjectedScri
ptManager*, InspectorDOMAgent*, V8DebuggerAgent*); |
| 64 | 63 |
| 65 ~InspectorDOMDebuggerAgent() override; | 64 ~InspectorDOMDebuggerAgent() override; |
| 66 DECLARE_VIRTUAL_TRACE(); | 65 DECLARE_VIRTUAL_TRACE(); |
| 67 | 66 |
| 68 // DOMDebugger API for InspectorFrontend | 67 // DOMDebugger API for InspectorFrontend |
| 69 void setXHRBreakpoint(ErrorString*, const String& url) override; | 68 void setXHRBreakpoint(ErrorString*, const String& url) override; |
| 70 void removeXHRBreakpoint(ErrorString*, const String& url) override; | 69 void removeXHRBreakpoint(ErrorString*, const String& url) override; |
| 71 void setEventListenerBreakpoint(ErrorString*, const String& eventName, const
String* targetName) override; | 70 void setEventListenerBreakpoint(ErrorString*, const String& eventName, const
String* targetName) override; |
| 72 void removeEventListenerBreakpoint(ErrorString*, const String& eventName, co
nst String* targetName) override; | 71 void removeEventListenerBreakpoint(ErrorString*, const String& eventName, co
nst String* targetName) override; |
| 73 void setInstrumentationBreakpoint(ErrorString*, const String& eventName) ove
rride; | 72 void setInstrumentationBreakpoint(ErrorString*, const String& eventName) ove
rride; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 84 void willModifyDOMAttr(Element*, const AtomicString&, const AtomicString&); | 83 void willModifyDOMAttr(Element*, const AtomicString&, const AtomicString&); |
| 85 void willSetInnerHTML(); | 84 void willSetInnerHTML(); |
| 86 void willSendXMLHttpRequest(const String& url); | 85 void willSendXMLHttpRequest(const String& url); |
| 87 void didInstallTimer(ExecutionContext*, int timerId, int timeout, bool singl
eShot); | 86 void didInstallTimer(ExecutionContext*, int timerId, int timeout, bool singl
eShot); |
| 88 void didRemoveTimer(ExecutionContext*, int timerId); | 87 void didRemoveTimer(ExecutionContext*, int timerId); |
| 89 void willFireTimer(ExecutionContext*, int timerId); | 88 void willFireTimer(ExecutionContext*, int timerId); |
| 90 void didRequestAnimationFrame(ExecutionContext*, int callbackId); | 89 void didRequestAnimationFrame(ExecutionContext*, int callbackId); |
| 91 void didCancelAnimationFrame(ExecutionContext*, int callbackId); | 90 void didCancelAnimationFrame(ExecutionContext*, int callbackId); |
| 92 void willFireAnimationFrame(ExecutionContext*, int callbackId); | 91 void willFireAnimationFrame(ExecutionContext*, int callbackId); |
| 93 void willHandleEvent(EventTarget*, Event*, EventListener*, bool useCapture); | 92 void willHandleEvent(EventTarget*, Event*, EventListener*, bool useCapture); |
| 94 void willEvaluateScript(const String& url, int lineNumber); | 93 void willEvaluateScript(); |
| 95 void didFireWebGLError(const String& errorName); | 94 void didFireWebGLError(const String& errorName); |
| 96 void didFireWebGLWarning(); | 95 void didFireWebGLWarning(); |
| 97 void didFireWebGLErrorOrWarning(const String& message); | 96 void didFireWebGLErrorOrWarning(const String& message); |
| 98 void willCloseWindow(); | 97 void willCloseWindow(); |
| 99 | 98 |
| 100 void disable(ErrorString*) override; | 99 void disable(ErrorString*) override; |
| 101 void restore() override; | 100 void restore() override; |
| 102 | 101 |
| 103 private: | 102 private: |
| 104 InspectorDOMDebuggerAgent(InjectedScriptManager*, InspectorDOMAgent*, Inspec
torDebuggerAgent*); | 103 InspectorDOMDebuggerAgent(InjectedScriptManager*, InspectorDOMAgent*, V8Debu
ggerAgent*); |
| 105 | 104 |
| 106 void pauseOnNativeEventIfNeeded(PassRefPtr<JSONObject> eventData, bool synch
ronous); | 105 void pauseOnNativeEventIfNeeded(PassRefPtr<JSONObject> eventData, bool synch
ronous); |
| 107 PassRefPtr<JSONObject> preparePauseOnNativeEventData(const String& eventName
, const String* targetName); | 106 PassRefPtr<JSONObject> preparePauseOnNativeEventData(const String& eventName
, const String* targetName); |
| 108 | 107 |
| 109 void descriptionForDOMEvent(Node* target, int breakpointType, bool insertion
, JSONObject* description); | 108 void descriptionForDOMEvent(Node* target, int breakpointType, bool insertion
, JSONObject* description); |
| 110 void updateSubtreeBreakpoints(Node*, uint32_t rootMask, bool set); | 109 void updateSubtreeBreakpoints(Node*, uint32_t rootMask, bool set); |
| 111 bool hasBreakpoint(Node*, int type); | 110 bool hasBreakpoint(Node*, int type); |
| 112 void setBreakpoint(ErrorString*, const String& eventName, const String* targ
etName); | 111 void setBreakpoint(ErrorString*, const String& eventName, const String* targ
etName); |
| 113 void removeBreakpoint(ErrorString*, const String& eventName, const String* t
argetName); | 112 void removeBreakpoint(ErrorString*, const String& eventName, const String* t
argetName); |
| 114 | 113 |
| 115 void didAddBreakpoint(); | 114 void didAddBreakpoint(); |
| 116 void didRemoveBreakpoint(); | 115 void didRemoveBreakpoint(); |
| 117 void setEnabled(bool); | 116 void setEnabled(bool); |
| 118 | 117 |
| 119 void eventListeners(InjectedScript&, v8::Local<v8::Value>, const String& obj
ectGroup, RefPtr<TypeBuilder::Array<TypeBuilder::DOMDebugger::EventListener>>& l
istenersArray); | 118 void eventListeners(InjectedScript&, v8::Local<v8::Value>, const String& obj
ectGroup, RefPtr<TypeBuilder::Array<TypeBuilder::DOMDebugger::EventListener>>& l
istenersArray); |
| 120 PassRefPtr<TypeBuilder::DOMDebugger::EventListener> buildObjectForEventListe
ner(InjectedScript&, v8::Local<v8::Object> handler, bool useCapture, const Strin
g& type, const String& objectGroupId); | 119 PassRefPtr<TypeBuilder::DOMDebugger::EventListener> buildObjectForEventListe
ner(InjectedScript&, v8::Local<v8::Object> handler, bool useCapture, const Strin
g& type, const String& objectGroupId); |
| 121 | 120 |
| 122 RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; | 121 RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; |
| 123 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; | 122 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; |
| 124 RawPtrWillBeMember<InspectorDebuggerAgent> m_debuggerAgent; | 123 RawPtrWillBeMember<V8DebuggerAgent> m_debuggerAgent; |
| 125 WillBeHeapHashMap<RawPtrWillBeMember<Node>, uint32_t> m_domBreakpoints; | 124 WillBeHeapHashMap<RawPtrWillBeMember<Node>, uint32_t> m_domBreakpoints; |
| 126 }; | 125 }; |
| 127 | 126 |
| 128 } // namespace blink | 127 } // namespace blink |
| 129 | 128 |
| 130 | 129 |
| 131 #endif // !defined(InspectorDOMDebuggerAgent_h) | 130 #endif // !defined(InspectorDOMDebuggerAgent_h) |
| OLD | NEW |