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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 virtual void startListeningScriptDebugServer() = 0; | 141 virtual void startListeningScriptDebugServer() = 0; |
142 virtual void stopListeningScriptDebugServer() = 0; | 142 virtual void stopListeningScriptDebugServer() = 0; |
143 virtual void muteConsole() = 0; | 143 virtual void muteConsole() = 0; |
144 virtual void unmuteConsole() = 0; | 144 virtual void unmuteConsole() = 0; |
145 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } | 145 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } |
146 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) = 0; | 146 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) = 0; |
147 virtual void addConsoleMessage(MessageSource, MessageLevel, const String& me
ssage, const String& sourceURL) = 0; | 147 virtual void addConsoleMessage(MessageSource, MessageLevel, const String& me
ssage, const String& sourceURL) = 0; |
148 | 148 |
149 virtual void enable(); | 149 virtual void enable(); |
150 virtual void disable(); | 150 virtual void disable(); |
151 virtual void didPause(ScriptState*, const ScriptValue& callFrames, const Scr
iptValue& exception); | 151 virtual void didPause(ScriptState*, const ScriptValue& callFrames, const Scr
iptValue& exception, const Vector<String>& hitBreakpoints); |
152 virtual void didContinue(); | 152 virtual void didContinue(); |
153 void reset(); | 153 void reset(); |
154 | 154 |
155 private: | 155 private: |
156 void cancelPauseOnNextStatement(); | 156 void cancelPauseOnNextStatement(); |
157 void addMessageToConsole(MessageSource, MessageType); | 157 void addMessageToConsole(MessageSource, MessageType); |
158 | 158 |
159 bool enabled(); | 159 bool enabled(); |
160 | 160 |
161 PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > currentCal
lFrames(); | 161 PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > currentCal
lFrames(); |
162 | 162 |
163 virtual void didParseSource(const String& scriptId, const Script&); | 163 virtual void didParseSource(const String& scriptId, const Script&); |
164 virtual void failedToParseSource(const String& url, const String& data, int
firstLine, int errorLine, const String& errorMessage); | 164 virtual void failedToParseSource(const String& url, const String& data, int
firstLine, int errorLine, const String& errorMessage); |
165 | 165 |
166 void setPauseOnExceptionsImpl(ErrorString*, int); | 166 void setPauseOnExceptionsImpl(ErrorString*, int); |
167 | 167 |
168 PassRefPtr<TypeBuilder::Debugger::Location> resolveBreakpoint(const String&
breakpointId, const String& scriptId, const ScriptBreakpoint&); | 168 PassRefPtr<TypeBuilder::Debugger::Location> resolveBreakpoint(const String&
breakpointId, const String& scriptId, const ScriptBreakpoint&); |
169 void clear(); | 169 void clear(); |
170 bool assertPaused(ErrorString*); | 170 bool assertPaused(ErrorString*); |
171 void clearBreakDetails(); | 171 void clearBreakDetails(); |
172 | 172 |
173 String sourceMapURLForScript(const Script&); | 173 String sourceMapURLForScript(const Script&); |
174 | 174 |
175 typedef HashMap<String, Script> ScriptsMap; | 175 typedef HashMap<String, Script> ScriptsMap; |
176 typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpoint
IdsMap; | 176 typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpoint
IdsMap; |
| 177 typedef HashMap<String, String> DebugServerBreakpointIdToBreakpointIdMap; |
177 | 178 |
178 InjectedScriptManager* m_injectedScriptManager; | 179 InjectedScriptManager* m_injectedScriptManager; |
179 InspectorFrontend::Debugger* m_frontend; | 180 InspectorFrontend::Debugger* m_frontend; |
180 ScriptState* m_pausedScriptState; | 181 ScriptState* m_pausedScriptState; |
181 ScriptValue m_currentCallStack; | 182 ScriptValue m_currentCallStack; |
182 ScriptsMap m_scripts; | 183 ScriptsMap m_scripts; |
183 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo
intIds; | 184 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo
intIds; |
| 185 DebugServerBreakpointIdToBreakpointIdMap m_serverBreakpointIdToBreakpointId; |
184 String m_continueToLocationBreakpointId; | 186 String m_continueToLocationBreakpointId; |
185 InspectorFrontend::Debugger::Reason::Enum m_breakReason; | 187 InspectorFrontend::Debugger::Reason::Enum m_breakReason; |
186 RefPtr<InspectorObject> m_breakAuxData; | 188 RefPtr<InspectorObject> m_breakAuxData; |
187 bool m_javaScriptPauseScheduled; | 189 bool m_javaScriptPauseScheduled; |
188 Listener* m_listener; | 190 Listener* m_listener; |
189 }; | 191 }; |
190 | 192 |
191 } // namespace WebCore | 193 } // namespace WebCore |
192 | 194 |
193 | 195 |
194 #endif // !defined(InspectorDebuggerAgent_h) | 196 #endif // !defined(InspectorDebuggerAgent_h) |
OLD | NEW |