OLD | NEW |
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 30 matching lines...) Expand all Loading... |
41 #include "core/inspector/ScriptDebugListener.h" | 41 #include "core/inspector/ScriptDebugListener.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 blink { | 48 namespace blink { |
49 | 49 |
50 class Document; | 50 class Document; |
| 51 class EditedResourcesContentManager; |
51 class Event; | 52 class Event; |
52 class EventListener; | 53 class EventListener; |
53 class EventTarget; | 54 class EventTarget; |
54 class ExecutionContextTask; | 55 class ExecutionContextTask; |
55 class FormData; | 56 class FormData; |
56 class HTTPHeaderMap; | 57 class HTTPHeaderMap; |
57 class InjectedScriptManager; | 58 class InjectedScriptManager; |
58 class InspectorFrontend; | 59 class InspectorFrontend; |
59 class InstrumentingAgents; | 60 class InstrumentingAgents; |
60 class JavaScriptCallFrame; | 61 class JavaScriptCallFrame; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 bool enabled(); | 190 bool enabled(); |
190 | 191 |
191 virtual ScriptDebugServer& scriptDebugServer() = 0; | 192 virtual ScriptDebugServer& scriptDebugServer() = 0; |
192 | 193 |
193 void setBreakpoint(const String& scriptId, int lineNumber, int columnNumber,
BreakpointSource, const String& condition = String()); | 194 void setBreakpoint(const String& scriptId, int lineNumber, int columnNumber,
BreakpointSource, const String& condition = String()); |
194 void removeBreakpoint(const String& scriptId, int lineNumber, int columnNumb
er, BreakpointSource); | 195 void removeBreakpoint(const String& scriptId, int lineNumber, int columnNumb
er, BreakpointSource); |
195 | 196 |
196 PassRefPtrWillBeRawPtr<ScriptAsyncCallStack> currentAsyncStackTraceForConsol
e(); | 197 PassRefPtrWillBeRawPtr<ScriptAsyncCallStack> currentAsyncStackTraceForConsol
e(); |
197 | 198 |
198 protected: | 199 protected: |
199 explicit InspectorDebuggerAgent(InjectedScriptManager*); | 200 explicit InspectorDebuggerAgent(InjectedScriptManager*, EditedResourcesConte
ntManager*); |
200 | 201 |
201 virtual void startListeningScriptDebugServer() = 0; | 202 virtual void startListeningScriptDebugServer() = 0; |
202 virtual void stopListeningScriptDebugServer() = 0; | 203 virtual void stopListeningScriptDebugServer() = 0; |
203 virtual void muteConsole() = 0; | 204 virtual void muteConsole() = 0; |
204 virtual void unmuteConsole() = 0; | 205 virtual void unmuteConsole() = 0; |
205 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } | 206 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } |
206 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) = 0; | 207 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) = 0; |
207 | 208 |
208 virtual void enable(); | 209 virtual void enable(); |
209 virtual void disable(); | 210 virtual void disable(); |
(...skipping 27 matching lines...) Expand all Loading... |
237 String sourceMapURLForScript(const Script&, CompileResult); | 238 String sourceMapURLForScript(const Script&, CompileResult); |
238 | 239 |
239 PassRefPtrWillBeRawPtr<JavaScriptCallFrame> topCallFrameSkipUnknownSources()
; | 240 PassRefPtrWillBeRawPtr<JavaScriptCallFrame> topCallFrameSkipUnknownSources()
; |
240 String scriptURL(JavaScriptCallFrame*); | 241 String scriptURL(JavaScriptCallFrame*); |
241 | 242 |
242 typedef HashMap<String, Script> ScriptsMap; | 243 typedef HashMap<String, Script> ScriptsMap; |
243 typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpoint
IdsMap; | 244 typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpoint
IdsMap; |
244 typedef HashMap<String, std::pair<String, BreakpointSource> > DebugServerBre
akpointToBreakpointIdAndSourceMap; | 245 typedef HashMap<String, std::pair<String, BreakpointSource> > DebugServerBre
akpointToBreakpointIdAndSourceMap; |
245 | 246 |
246 RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; | 247 RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; |
| 248 RawPtrWillBeMember<EditedResourcesContentManager> m_editedResourcesContentMa
nager; |
247 InspectorFrontend::Debugger* m_frontend; | 249 InspectorFrontend::Debugger* m_frontend; |
248 RefPtr<ScriptState> m_pausedScriptState; | 250 RefPtr<ScriptState> m_pausedScriptState; |
249 ScriptValue m_currentCallStack; | 251 ScriptValue m_currentCallStack; |
250 ScriptsMap m_scripts; | 252 ScriptsMap m_scripts; |
251 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo
intIds; | 253 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo
intIds; |
252 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; | 254 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; |
253 String m_continueToLocationBreakpointId; | 255 String m_continueToLocationBreakpointId; |
254 InspectorFrontend::Debugger::Reason::Enum m_breakReason; | 256 InspectorFrontend::Debugger::Reason::Enum m_breakReason; |
255 RefPtr<JSONObject> m_breakAuxData; | 257 RefPtr<JSONObject> m_breakAuxData; |
256 bool m_javaScriptPauseScheduled; | 258 bool m_javaScriptPauseScheduled; |
257 bool m_debuggerStepScheduled; | 259 bool m_debuggerStepScheduled; |
258 bool m_steppingFromFramework; | 260 bool m_steppingFromFramework; |
259 bool m_pausingOnNativeEvent; | 261 bool m_pausingOnNativeEvent; |
260 RawPtrWillBeMember<Listener> m_listener; | 262 RawPtrWillBeMember<Listener> m_listener; |
261 | 263 |
262 int m_skippedStepInCount; | 264 int m_skippedStepInCount; |
263 int m_minFrameCountForSkip; | 265 int m_minFrameCountForSkip; |
264 bool m_skipAllPauses; | 266 bool m_skipAllPauses; |
265 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; | 267 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; |
266 AsyncCallStackTracker m_asyncCallStackTracker; | 268 AsyncCallStackTracker m_asyncCallStackTracker; |
267 }; | 269 }; |
268 | 270 |
269 } // namespace blink | 271 } // namespace blink |
270 | 272 |
271 | 273 |
272 #endif // !defined(InspectorDebuggerAgent_h) | 274 #endif // !defined(InspectorDebuggerAgent_h) |
OLD | NEW |