Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Side by Side Diff: Source/core/inspector/InspectorDebuggerAgent.h

Issue 114033002: DevTools: Capture async stacks for event listeners. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: construct event description Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. 3 * Copyright (C) 2010-2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 14 matching lines...) Expand all
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 #ifndef InspectorDebuggerAgent_h 30 #ifndef InspectorDebuggerAgent_h
31 #define InspectorDebuggerAgent_h 31 #define InspectorDebuggerAgent_h
32 32
33 #include "InspectorFrontend.h" 33 #include "InspectorFrontend.h"
34 #include "bindings/v8/ScriptState.h" 34 #include "bindings/v8/ScriptState.h"
35 #include "core/frame/ConsoleTypes.h"
35 #include "core/inspector/AsyncCallStackTracker.h" 36 #include "core/inspector/AsyncCallStackTracker.h"
36 #include "core/inspector/ConsoleAPITypes.h" 37 #include "core/inspector/ConsoleAPITypes.h"
37 #include "core/inspector/InjectedScript.h" 38 #include "core/inspector/InjectedScript.h"
38 #include "core/inspector/InspectorBaseAgent.h" 39 #include "core/inspector/InspectorBaseAgent.h"
39 #include "core/inspector/ScriptBreakpoint.h" 40 #include "core/inspector/ScriptBreakpoint.h"
40 #include "core/inspector/ScriptDebugListener.h" 41 #include "core/inspector/ScriptDebugListener.h"
41 #include "core/frame/ConsoleTypes.h"
42 #include "wtf/Forward.h" 42 #include "wtf/Forward.h"
43 #include "wtf/HashMap.h" 43 #include "wtf/HashMap.h"
44 #include "wtf/PassRefPtr.h" 44 #include "wtf/PassRefPtr.h"
45 #include "wtf/Vector.h" 45 #include "wtf/Vector.h"
46 #include "wtf/text/StringHash.h" 46 #include "wtf/text/StringHash.h"
47 47
48 namespace WebCore { 48 namespace WebCore {
49 49
50 class Document; 50 class Document;
51 class EventListener;
52 class EventTarget;
51 class InjectedScriptManager; 53 class InjectedScriptManager;
52 class InspectorFrontend; 54 class InspectorFrontend;
53 class InstrumentingAgents; 55 class InstrumentingAgents;
54 class JSONObject; 56 class JSONObject;
57 class KURL;
55 class ScriptArguments; 58 class ScriptArguments;
56 class ScriptCallStack; 59 class ScriptCallStack;
57 class ScriptDebugServer; 60 class ScriptDebugServer;
61 class ScriptRegexp;
58 class ScriptSourceCode; 62 class ScriptSourceCode;
59 class ScriptValue; 63 class ScriptValue;
60 class ScriptRegexp;
61 64
62 typedef String ErrorString; 65 typedef String ErrorString;
63 66
64 class InspectorDebuggerAgent : public InspectorBaseAgent<InspectorDebuggerAgent> , public ScriptDebugListener, public InspectorBackendDispatcher::DebuggerCommand Handler { 67 class InspectorDebuggerAgent : public InspectorBaseAgent<InspectorDebuggerAgent> , public ScriptDebugListener, public InspectorBackendDispatcher::DebuggerCommand Handler {
65 WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); WTF_MAKE_FAST_ALLOCATED; 68 WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); WTF_MAKE_FAST_ALLOCATED;
66 public: 69 public:
67 enum BreakpointSource { 70 enum BreakpointSource {
68 UserBreakpointSource, 71 UserBreakpointSource,
69 DebugCommandBreakpointSource, 72 DebugCommandBreakpointSource,
70 MonitorCommandBreakpointSource 73 MonitorCommandBreakpointSource
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 134
132 void schedulePauseOnNextStatement(InspectorFrontend::Debugger::Reason::Enum breakReason, PassRefPtr<JSONObject> data); 135 void schedulePauseOnNextStatement(InspectorFrontend::Debugger::Reason::Enum breakReason, PassRefPtr<JSONObject> data);
133 void didInstallTimer(ExecutionContext*, int timerId, int timeout, bool singl eShot); 136 void didInstallTimer(ExecutionContext*, int timerId, int timeout, bool singl eShot);
134 void didRemoveTimer(ExecutionContext*, int timerId); 137 void didRemoveTimer(ExecutionContext*, int timerId);
135 bool willFireTimer(ExecutionContext*, int timerId); 138 bool willFireTimer(ExecutionContext*, int timerId);
136 void didFireTimer(); 139 void didFireTimer();
137 void didRequestAnimationFrame(Document*, int callbackId); 140 void didRequestAnimationFrame(Document*, int callbackId);
138 void didCancelAnimationFrame(Document*, int callbackId); 141 void didCancelAnimationFrame(Document*, int callbackId);
139 bool willFireAnimationFrame(Document*, int callbackId); 142 bool willFireAnimationFrame(Document*, int callbackId);
140 void didFireAnimationFrame(); 143 void didFireAnimationFrame();
144 void didAddEventListener(EventTarget*, const AtomicString& eventType, EventL istener*, bool useCapture);
145 void didRemoveEventListener(EventTarget*, const AtomicString& eventType, Eve ntListener*, bool useCapture);
146 void didRemoveAllEventListeners(EventTarget*);
147 void willHandleEvent(EventTarget*, const AtomicString& eventType, EventListe ner*, bool useCapture);
141 void didHandleEvent(); 148 void didHandleEvent();
142 bool canBreakProgram(); 149 bool canBreakProgram();
143 void breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, Pas sRefPtr<JSONObject> data); 150 void breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, Pas sRefPtr<JSONObject> data);
144 virtual void scriptExecutionBlockedByCSP(const String& directiveText); 151 virtual void scriptExecutionBlockedByCSP(const String& directiveText);
145 152
146 class Listener { 153 class Listener {
147 public: 154 public:
148 virtual ~Listener() { } 155 virtual ~Listener() { }
149 virtual void debuggerWasEnabled() = 0; 156 virtual void debuggerWasEnabled() = 0;
150 virtual void debuggerWasDisabled() = 0; 157 virtual void debuggerWasDisabled() = 0;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 int m_skipStepInCount; 232 int m_skipStepInCount;
226 bool m_skipAllPauses; 233 bool m_skipAllPauses;
227 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; 234 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp;
228 AsyncCallStackTracker m_asyncCallStackTracker; 235 AsyncCallStackTracker m_asyncCallStackTracker;
229 }; 236 };
230 237
231 } // namespace WebCore 238 } // namespace WebCore
232 239
233 240
234 #endif // !defined(InspectorDebuggerAgent_h) 241 #endif // !defined(InspectorDebuggerAgent_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698