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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 class InspectorState; | 54 class InspectorState; |
55 class InspectorValue; | 55 class InspectorValue; |
56 class InstrumentingAgents; | 56 class InstrumentingAgents; |
57 class ScriptArguments; | 57 class ScriptArguments; |
58 class ScriptCallStack; | 58 class ScriptCallStack; |
59 class ScriptDebugServer; | 59 class ScriptDebugServer; |
60 class ScriptValue; | 60 class ScriptValue; |
61 | 61 |
62 typedef String ErrorString; | 62 typedef String ErrorString; |
63 | 63 |
64 class InspectorDebuggerAgent : public InspectorBaseAgent<InspectorDebuggerAgent>
, public ScriptDebugListener, public InspectorBackendDispatcher::DebuggerCommand
Handler { | 64 class InspectorDebuggerAgent : public InspectorBaseAgent, public ScriptDebugList
ener, public InspectorBackendDispatcher::DebuggerCommandHandler { |
65 WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); WTF_MAKE_FAST_ALLOCATED; | 65 WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); WTF_MAKE_FAST_ALLOCATED; |
66 public: | 66 public: |
67 enum BreakpointSource { | 67 enum BreakpointSource { |
68 UserBreakpointSource, | 68 UserBreakpointSource, |
69 DebugCommandBreakpointSource | 69 DebugCommandBreakpointSource |
70 }; | 70 }; |
71 | 71 |
72 static const char* backtraceObjectGroup; | 72 static const char* backtraceObjectGroup; |
73 | 73 |
74 virtual ~InspectorDebuggerAgent(); | 74 virtual ~InspectorDebuggerAgent(); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 void setListener(Listener* listener) { m_listener = listener; } | 138 void setListener(Listener* listener) { m_listener = listener; } |
139 | 139 |
140 virtual ScriptDebugServer& scriptDebugServer() = 0; | 140 virtual ScriptDebugServer& scriptDebugServer() = 0; |
141 | 141 |
142 virtual void reportMemoryUsage(MemoryObjectInfo*) const; | 142 virtual void reportMemoryUsage(MemoryObjectInfo*) const; |
143 | 143 |
144 void setBreakpoint(const String& scriptId, int lineNumber, int columnNumber,
BreakpointSource); | 144 void setBreakpoint(const String& scriptId, int lineNumber, int columnNumber,
BreakpointSource); |
145 void removeBreakpoint(const String& scriptId, int lineNumber, int columnNumb
er, BreakpointSource); | 145 void removeBreakpoint(const String& scriptId, int lineNumber, int columnNumb
er, BreakpointSource); |
146 | 146 |
147 protected: | 147 protected: |
148 InspectorDebuggerAgent(InstrumentingAgents*, InspectorCompositeState*, Injec
tedScriptManager*); | 148 InspectorDebuggerAgent(InstrumentingAgents*, InspectorState*, InjectedScript
Manager*); |
149 | 149 |
150 virtual void startListeningScriptDebugServer() = 0; | 150 virtual void startListeningScriptDebugServer() = 0; |
151 virtual void stopListeningScriptDebugServer() = 0; | 151 virtual void stopListeningScriptDebugServer() = 0; |
152 virtual void muteConsole() = 0; | 152 virtual void muteConsole() = 0; |
153 virtual void unmuteConsole() = 0; | 153 virtual void unmuteConsole() = 0; |
154 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } | 154 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } |
155 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) = 0; | 155 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) = 0; |
156 virtual void addConsoleMessage(MessageSource, MessageLevel, const String& me
ssage, const String& sourceURL) = 0; | 156 virtual void addConsoleMessage(MessageSource, MessageLevel, const String& me
ssage, const String& sourceURL) = 0; |
157 | 157 |
158 virtual void enable(); | 158 virtual void enable(); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 ScriptsMap m_scripts; | 193 ScriptsMap m_scripts; |
194 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo
intIds; | 194 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo
intIds; |
195 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; | 195 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; |
196 String m_continueToLocationBreakpointId; | 196 String m_continueToLocationBreakpointId; |
197 InspectorFrontend::Debugger::Reason::Enum m_breakReason; | 197 InspectorFrontend::Debugger::Reason::Enum m_breakReason; |
198 RefPtr<InspectorObject> m_breakAuxData; | 198 RefPtr<InspectorObject> m_breakAuxData; |
199 bool m_javaScriptPauseScheduled; | 199 bool m_javaScriptPauseScheduled; |
200 Listener* m_listener; | 200 Listener* m_listener; |
201 }; | 201 }; |
202 | 202 |
| 203 class InspectorDebuggerController : public InspectorBaseController<InspectorDebu
ggerController, InspectorDebuggerAgent> { |
| 204 protected: |
| 205 InspectorDebuggerController(InstrumentingAgents* instrumentingAgents, Inspec
torCompositeState* compositeState) |
| 206 : InspectorBaseController<InspectorDebuggerController, InspectorDebugger
Agent>("Debugger", instrumentingAgents, compositeState) { } |
| 207 }; |
| 208 |
203 } // namespace WebCore | 209 } // namespace WebCore |
204 | 210 |
205 | 211 |
206 #endif // !defined(InspectorDebuggerAgent_h) | 212 #endif // !defined(InspectorDebuggerAgent_h) |
OLD | NEW |