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

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

Issue 307943002: Oilpan: Prepare moving InspectorController and InspectorAgents to oilpan. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Created 6 years, 6 months 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 String sourceMapURLForScript(const Script&); 222 String sourceMapURLForScript(const Script&);
221 223
222 String scriptURL(JavaScriptCallFrame*); 224 String scriptURL(JavaScriptCallFrame*);
223 225
224 ScriptValue resolveCallFrame(ErrorString*, const String* callFrameId); 226 ScriptValue resolveCallFrame(ErrorString*, const String* callFrameId);
225 227
226 typedef HashMap<String, Script> ScriptsMap; 228 typedef HashMap<String, Script> ScriptsMap;
227 typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpoint IdsMap; 229 typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpoint IdsMap;
228 typedef HashMap<String, std::pair<String, BreakpointSource> > DebugServerBre akpointToBreakpointIdAndSourceMap; 230 typedef HashMap<String, std::pair<String, BreakpointSource> > DebugServerBre akpointToBreakpointIdAndSourceMap;
229 231
232 // FIXME: Oilpan: Move InjectedScriptManager to heap in follow-up CL.
230 InjectedScriptManager* m_injectedScriptManager; 233 InjectedScriptManager* m_injectedScriptManager;
231 InspectorFrontend::Debugger* m_frontend; 234 InspectorFrontend::Debugger* m_frontend;
232 RefPtr<ScriptState> m_pausedScriptState; 235 RefPtr<ScriptState> m_pausedScriptState;
233 ScriptValue m_currentCallStack; 236 ScriptValue m_currentCallStack;
234 ScriptsMap m_scripts; 237 ScriptsMap m_scripts;
235 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo intIds; 238 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo intIds;
236 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; 239 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints;
237 String m_continueToLocationBreakpointId; 240 String m_continueToLocationBreakpointId;
238 InspectorFrontend::Debugger::Reason::Enum m_breakReason; 241 InspectorFrontend::Debugger::Reason::Enum m_breakReason;
239 RefPtr<JSONObject> m_breakAuxData; 242 RefPtr<JSONObject> m_breakAuxData;
240 bool m_javaScriptPauseScheduled; 243 bool m_javaScriptPauseScheduled;
241 bool m_debuggerStepScheduled; 244 bool m_debuggerStepScheduled;
242 bool m_pausingOnNativeEvent; 245 bool m_pausingOnNativeEvent;
243 Listener* m_listener; 246 RawPtrWillBeMember<Listener> m_listener;
244 247
245 int m_skippedStepInCount; 248 int m_skippedStepInCount;
246 int m_minFrameCountForSkip; 249 int m_minFrameCountForSkip;
247 bool m_skipAllPauses; 250 bool m_skipAllPauses;
248 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; 251 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp;
249 AsyncCallStackTracker m_asyncCallStackTracker; 252 AsyncCallStackTracker m_asyncCallStackTracker;
250 }; 253 };
251 254
252 } // namespace WebCore 255 } // namespace WebCore
253 256
254 257
255 #endif // !defined(InspectorDebuggerAgent_h) 258 #endif // !defined(InspectorDebuggerAgent_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698