| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 class ScriptDebugServer; | 65 class ScriptDebugServer; |
| 66 class ScriptRegexp; | 66 class ScriptRegexp; |
| 67 class ScriptSourceCode; | 67 class ScriptSourceCode; |
| 68 class ScriptValue; | 68 class ScriptValue; |
| 69 class ThreadableLoaderClient; | 69 class ThreadableLoaderClient; |
| 70 class XMLHttpRequest; | 70 class XMLHttpRequest; |
| 71 | 71 |
| 72 typedef String ErrorString; | 72 typedef String ErrorString; |
| 73 | 73 |
| 74 class InspectorDebuggerAgent : public InspectorBaseAgent<InspectorDebuggerAgent>
, public ScriptDebugListener, public InspectorBackendDispatcher::DebuggerCommand
Handler { | 74 class InspectorDebuggerAgent : public InspectorBaseAgent<InspectorDebuggerAgent>
, public ScriptDebugListener, public InspectorBackendDispatcher::DebuggerCommand
Handler { |
| 75 WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); WTF_MAKE_FAST_ALLOCATED; | 75 WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); |
| 76 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| 76 public: | 77 public: |
| 77 enum BreakpointSource { | 78 enum BreakpointSource { |
| 78 UserBreakpointSource, | 79 UserBreakpointSource, |
| 79 DebugCommandBreakpointSource, | 80 DebugCommandBreakpointSource, |
| 80 MonitorCommandBreakpointSource | 81 MonitorCommandBreakpointSource |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 static const char backtraceObjectGroup[]; | 84 static const char backtraceObjectGroup[]; |
| 84 | 85 |
| 85 virtual ~InspectorDebuggerAgent(); | 86 virtual ~InspectorDebuggerAgent(); |
| 87 virtual void trace(Visitor*); |
| 86 | 88 |
| 87 virtual void canSetScriptSource(ErrorString*, bool* result) OVERRIDE FINAL {
*result = true; } | 89 virtual void canSetScriptSource(ErrorString*, bool* result) OVERRIDE FINAL {
*result = true; } |
| 88 | 90 |
| 89 virtual void init() OVERRIDE FINAL; | 91 virtual void init() OVERRIDE FINAL; |
| 90 virtual void setFrontend(InspectorFrontend*) OVERRIDE FINAL; | 92 virtual void setFrontend(InspectorFrontend*) OVERRIDE FINAL; |
| 91 virtual void clearFrontend() OVERRIDE FINAL; | 93 virtual void clearFrontend() OVERRIDE FINAL; |
| 92 virtual void restore() OVERRIDE FINAL; | 94 virtual void restore() OVERRIDE FINAL; |
| 93 | 95 |
| 94 bool isPaused(); | 96 bool isPaused(); |
| 95 bool runningNestedMessageLoop(); | 97 bool runningNestedMessageLoop(); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 void didHandleEvent(); | 157 void didHandleEvent(); |
| 156 void willLoadXHR(XMLHttpRequest*, ThreadableLoaderClient*, const AtomicStrin
g& method, const KURL&, bool async, FormData* body, const HTTPHeaderMap& headers
, bool includeCrendentials); | 158 void willLoadXHR(XMLHttpRequest*, ThreadableLoaderClient*, const AtomicStrin
g& method, const KURL&, bool async, FormData* body, const HTTPHeaderMap& headers
, bool includeCrendentials); |
| 157 void didEnqueueMutationRecord(ExecutionContext*, MutationObserver*); | 159 void didEnqueueMutationRecord(ExecutionContext*, MutationObserver*); |
| 158 void didClearAllMutationRecords(ExecutionContext*, MutationObserver*); | 160 void didClearAllMutationRecords(ExecutionContext*, MutationObserver*); |
| 159 void willDeliverMutationRecords(ExecutionContext*, MutationObserver*); | 161 void willDeliverMutationRecords(ExecutionContext*, MutationObserver*); |
| 160 void didDeliverMutationRecords(); | 162 void didDeliverMutationRecords(); |
| 161 bool canBreakProgram(); | 163 bool canBreakProgram(); |
| 162 void breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, Pas
sRefPtr<JSONObject> data); | 164 void breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, Pas
sRefPtr<JSONObject> data); |
| 163 void scriptExecutionBlockedByCSP(const String& directiveText); | 165 void scriptExecutionBlockedByCSP(const String& directiveText); |
| 164 | 166 |
| 165 class Listener { | 167 class Listener : public WillBeGarbageCollectedMixin { |
| 166 public: | 168 public: |
| 167 virtual ~Listener() { } | 169 virtual ~Listener() { } |
| 168 virtual void debuggerWasEnabled() = 0; | 170 virtual void debuggerWasEnabled() = 0; |
| 169 virtual void debuggerWasDisabled() = 0; | 171 virtual void debuggerWasDisabled() = 0; |
| 170 virtual void stepInto() = 0; | 172 virtual void stepInto() = 0; |
| 171 virtual void didPause() = 0; | 173 virtual void didPause() = 0; |
| 172 }; | 174 }; |
| 173 void setListener(Listener* listener) { m_listener = listener; } | 175 void setListener(Listener* listener) { m_listener = listener; } |
| 174 | 176 |
| 175 bool enabled(); | 177 bool enabled(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 void clearBreakDetails(); | 220 void clearBreakDetails(); |
| 219 | 221 |
| 220 String sourceMapURLForScript(const Script&); | 222 String sourceMapURLForScript(const Script&); |
| 221 | 223 |
| 222 String scriptURL(JavaScriptCallFrame*); | 224 String scriptURL(JavaScriptCallFrame*); |
| 223 | 225 |
| 224 typedef HashMap<String, Script> ScriptsMap; | 226 typedef HashMap<String, Script> ScriptsMap; |
| 225 typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpoint
IdsMap; | 227 typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpoint
IdsMap; |
| 226 typedef HashMap<String, std::pair<String, BreakpointSource> > DebugServerBre
akpointToBreakpointIdAndSourceMap; | 228 typedef HashMap<String, std::pair<String, BreakpointSource> > DebugServerBre
akpointToBreakpointIdAndSourceMap; |
| 227 | 229 |
| 230 // FIXME: Oilpan: Move InjectedScriptManager to heap in follow-up CL. |
| 228 InjectedScriptManager* m_injectedScriptManager; | 231 InjectedScriptManager* m_injectedScriptManager; |
| 229 InspectorFrontend::Debugger* m_frontend; | 232 InspectorFrontend::Debugger* m_frontend; |
| 230 RefPtr<ScriptState> m_pausedScriptState; | 233 RefPtr<ScriptState> m_pausedScriptState; |
| 231 ScriptValue m_currentCallStack; | 234 ScriptValue m_currentCallStack; |
| 232 ScriptsMap m_scripts; | 235 ScriptsMap m_scripts; |
| 233 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo
intIds; | 236 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo
intIds; |
| 234 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; | 237 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; |
| 235 String m_continueToLocationBreakpointId; | 238 String m_continueToLocationBreakpointId; |
| 236 InspectorFrontend::Debugger::Reason::Enum m_breakReason; | 239 InspectorFrontend::Debugger::Reason::Enum m_breakReason; |
| 237 RefPtr<JSONObject> m_breakAuxData; | 240 RefPtr<JSONObject> m_breakAuxData; |
| 238 bool m_javaScriptPauseScheduled; | 241 bool m_javaScriptPauseScheduled; |
| 239 bool m_debuggerStepScheduled; | 242 bool m_debuggerStepScheduled; |
| 240 bool m_pausingOnNativeEvent; | 243 bool m_pausingOnNativeEvent; |
| 241 Listener* m_listener; | 244 RawPtrWillBeMember<Listener> m_listener; |
| 242 | 245 |
| 243 int m_skippedStepInCount; | 246 int m_skippedStepInCount; |
| 244 int m_minFrameCountForSkip; | 247 int m_minFrameCountForSkip; |
| 245 bool m_skipAllPauses; | 248 bool m_skipAllPauses; |
| 246 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; | 249 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; |
| 247 AsyncCallStackTracker m_asyncCallStackTracker; | 250 AsyncCallStackTracker m_asyncCallStackTracker; |
| 248 }; | 251 }; |
| 249 | 252 |
| 250 } // namespace WebCore | 253 } // namespace WebCore |
| 251 | 254 |
| 252 | 255 |
| 253 #endif // !defined(InspectorDebuggerAgent_h) | 256 #endif // !defined(InspectorDebuggerAgent_h) |
| OLD | NEW |