| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 UserBreakpointSource, | 83 UserBreakpointSource, |
| 84 DebugCommandBreakpointSource, | 84 DebugCommandBreakpointSource, |
| 85 MonitorCommandBreakpointSource | 85 MonitorCommandBreakpointSource |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 static const char backtraceObjectGroup[]; | 88 static const char backtraceObjectGroup[]; |
| 89 | 89 |
| 90 virtual ~InspectorDebuggerAgent(); | 90 virtual ~InspectorDebuggerAgent(); |
| 91 virtual void trace(Visitor*); | 91 virtual void trace(Visitor*); |
| 92 | 92 |
| 93 virtual void canSetScriptSource(ErrorString*, bool* result) OVERRIDE FINAL {
*result = true; } | 93 virtual void canSetScriptSource(ErrorString*, bool* result) override final {
*result = true; } |
| 94 | 94 |
| 95 virtual void init() OVERRIDE FINAL; | 95 virtual void init() override final; |
| 96 virtual void setFrontend(InspectorFrontend*) OVERRIDE FINAL; | 96 virtual void setFrontend(InspectorFrontend*) override final; |
| 97 virtual void clearFrontend() OVERRIDE FINAL; | 97 virtual void clearFrontend() override final; |
| 98 virtual void restore() OVERRIDE FINAL; | 98 virtual void restore() override final; |
| 99 | 99 |
| 100 bool isPaused(); | 100 bool isPaused(); |
| 101 bool runningNestedMessageLoop(); | 101 bool runningNestedMessageLoop(); |
| 102 void addMessageToConsole(ConsoleMessage*); | 102 void addMessageToConsole(ConsoleMessage*); |
| 103 | 103 |
| 104 String preprocessEventListener(LocalFrame*, const String& source, const Stri
ng& url, const String& functionName); | 104 String preprocessEventListener(LocalFrame*, const String& source, const Stri
ng& url, const String& functionName); |
| 105 PassOwnPtr<ScriptSourceCode> preprocess(LocalFrame*, const ScriptSourceCode&
); | 105 PassOwnPtr<ScriptSourceCode> preprocess(LocalFrame*, const ScriptSourceCode&
); |
| 106 | 106 |
| 107 // Part of the protocol. | 107 // Part of the protocol. |
| 108 virtual void enable(ErrorString*) OVERRIDE FINAL; | 108 virtual void enable(ErrorString*) override final; |
| 109 virtual void disable(ErrorString*) OVERRIDE FINAL; | 109 virtual void disable(ErrorString*) override final; |
| 110 virtual void setBreakpointsActive(ErrorString*, bool active) OVERRIDE FINAL; | 110 virtual void setBreakpointsActive(ErrorString*, bool active) override final; |
| 111 virtual void setSkipAllPauses(ErrorString*, bool skipped, const bool* untilR
eload) OVERRIDE FINAL; | 111 virtual void setSkipAllPauses(ErrorString*, bool skipped, const bool* untilR
eload) override final; |
| 112 | 112 |
| 113 virtual void setBreakpointByUrl(ErrorString*, int lineNumber, const String*
optionalURL, const String* optionalURLRegex, const int* optionalColumnNumber, co
nst String* optionalCondition, const bool* isAntiBreakpoint, TypeBuilder::Debugg
er::BreakpointId*, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::Location> >&
locations) OVERRIDE FINAL; | 113 virtual void setBreakpointByUrl(ErrorString*, int lineNumber, const String*
optionalURL, const String* optionalURLRegex, const int* optionalColumnNumber, co
nst String* optionalCondition, const bool* isAntiBreakpoint, TypeBuilder::Debugg
er::BreakpointId*, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::Location> >&
locations) override final; |
| 114 virtual void setBreakpoint(ErrorString*, const RefPtr<JSONObject>& location,
const String* optionalCondition, TypeBuilder::Debugger::BreakpointId*, RefPtr<T
ypeBuilder::Debugger::Location>& actualLocation) OVERRIDE FINAL; | 114 virtual void setBreakpoint(ErrorString*, const RefPtr<JSONObject>& location,
const String* optionalCondition, TypeBuilder::Debugger::BreakpointId*, RefPtr<T
ypeBuilder::Debugger::Location>& actualLocation) override final; |
| 115 virtual void removeBreakpoint(ErrorString*, const String& breakpointId) OVER
RIDE FINAL; | 115 virtual void removeBreakpoint(ErrorString*, const String& breakpointId) over
ride final; |
| 116 virtual void continueToLocation(ErrorString*, const RefPtr<JSONObject>& loca
tion, const bool* interstateLocationOpt) OVERRIDE FINAL; | 116 virtual void continueToLocation(ErrorString*, const RefPtr<JSONObject>& loca
tion, const bool* interstateLocationOpt) override final; |
| 117 virtual void getStepInPositions(ErrorString*, const String& callFrameId, Ref
Ptr<TypeBuilder::Array<TypeBuilder::Debugger::Location> >& positions) OVERRIDE F
INAL; | 117 virtual void getStepInPositions(ErrorString*, const String& callFrameId, Ref
Ptr<TypeBuilder::Array<TypeBuilder::Debugger::Location> >& positions) override f
inal; |
| 118 virtual void getBacktrace(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilde
r::Debugger::CallFrame> >&, RefPtr<TypeBuilder::Debugger::StackTrace>&) OVERRIDE
FINAL; | 118 virtual void getBacktrace(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilde
r::Debugger::CallFrame> >&, RefPtr<TypeBuilder::Debugger::StackTrace>&) override
final; |
| 119 | 119 virtual void searchInContent(ErrorString*, const String& scriptId, const Str
ing& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefP
tr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch> >&) override final; |
| 120 virtual void searchInContent(ErrorString*, const String& scriptId, const Str
ing& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefP
tr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch> >&) OVERRIDE FINAL; | 120 virtual void setScriptSource(ErrorString*, RefPtr<TypeBuilder::Debugger::Set
ScriptSourceError>&, const String& scriptId, const String& newContent, const boo
l* preview, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> >& newCa
llFrames, RefPtr<JSONObject>& result, RefPtr<TypeBuilder::Debugger::StackTrace>&
asyncStackTrace) override final; |
| 121 virtual void setScriptSource(ErrorString*, RefPtr<TypeBuilder::Debugger::Set
ScriptSourceError>&, const String& scriptId, const String& newContent, const boo
l* preview, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> >& newCa
llFrames, RefPtr<JSONObject>& result, RefPtr<TypeBuilder::Debugger::StackTrace>&
asyncStackTrace) OVERRIDE FINAL; | 121 virtual void restartFrame(ErrorString*, const String& callFrameId, RefPtr<Ty
peBuilder::Array<TypeBuilder::Debugger::CallFrame> >& newCallFrames, RefPtr<JSON
Object>& result, RefPtr<TypeBuilder::Debugger::StackTrace>& asyncStackTrace) ove
rride final; |
| 122 virtual void restartFrame(ErrorString*, const String& callFrameId, RefPtr<Ty
peBuilder::Array<TypeBuilder::Debugger::CallFrame> >& newCallFrames, RefPtr<JSON
Object>& result, RefPtr<TypeBuilder::Debugger::StackTrace>& asyncStackTrace) OVE
RRIDE FINAL; | 122 virtual void getScriptSource(ErrorString*, const String& scriptId, String* s
criptSource) override final; |
| 123 virtual void getScriptSource(ErrorString*, const String& scriptId, String* s
criptSource) OVERRIDE FINAL; | 123 virtual void getFunctionDetails(ErrorString*, const String& functionId, RefP
tr<TypeBuilder::Debugger::FunctionDetails>&) override final; |
| 124 virtual void getFunctionDetails(ErrorString*, const String& functionId, RefP
tr<TypeBuilder::Debugger::FunctionDetails>&) OVERRIDE FINAL; | 124 virtual void getCollectionEntries(ErrorString*, const String& objectId, RefP
tr<TypeBuilder::Array<TypeBuilder::Debugger::CollectionEntry> >&) override final
; |
| 125 virtual void getCollectionEntries(ErrorString*, const String& objectId, RefP
tr<TypeBuilder::Array<TypeBuilder::Debugger::CollectionEntry> >&) OVERRIDE FINAL
; | 125 virtual void pause(ErrorString*) override final; |
| 126 virtual void pause(ErrorString*) OVERRIDE FINAL; | 126 virtual void resume(ErrorString*) override final; |
| 127 virtual void resume(ErrorString*) OVERRIDE FINAL; | 127 virtual void stepOver(ErrorString*) override final; |
| 128 virtual void stepOver(ErrorString*) OVERRIDE FINAL; | 128 virtual void stepInto(ErrorString*) override final; |
| 129 virtual void stepInto(ErrorString*) OVERRIDE FINAL; | 129 virtual void stepOut(ErrorString*) override final; |
| 130 virtual void stepOut(ErrorString*) OVERRIDE FINAL; | 130 virtual void setPauseOnExceptions(ErrorString*, const String& pauseState) ov
erride final; |
| 131 virtual void setPauseOnExceptions(ErrorString*, const String& pauseState) OV
ERRIDE FINAL; | |
| 132 virtual void evaluateOnCallFrame(ErrorString*, | 131 virtual void evaluateOnCallFrame(ErrorString*, |
| 133 const String& callFrameId, | 132 const String& callFrameId, |
| 134 const String& expression, | 133 const String& expression, |
| 135 const String* objectGroup, | 134 const String* objectGroup, |
| 136 const bool* includeCommandLineAPI, | 135 const bool* includeCommandLineAPI, |
| 137 const bool* doNotPauseOnExceptionsAndMuteConsole, | 136 const bool* doNotPauseOnExceptionsAndMuteConsole, |
| 138 const bool* returnByValue, | 137 const bool* returnByValue, |
| 139 const bool* generatePreview, | 138 const bool* generatePreview, |
| 140 RefPtr<TypeBuilder::Runtime::RemoteObject>& result, | 139 RefPtr<TypeBuilder::Runtime::RemoteObject>& result, |
| 141 TypeBuilder::OptOutput<bool>* wasThrown, | 140 TypeBuilder::OptOutput<bool>* wasThrown, |
| 142 RefPtr<TypeBuilder::Debugger::ExceptionDetails>&) OVERRIDE FINAL; | 141 RefPtr<TypeBuilder::Debugger::ExceptionDetails>&) override final; |
| 143 virtual void compileScript(ErrorString*, const String& expression, const Str
ing& sourceURL, const int* executionContextId, TypeBuilder::OptOutput<TypeBuilde
r::Debugger::ScriptId>*, RefPtr<TypeBuilder::Debugger::ExceptionDetails>&) OVERR
IDE; | 142 virtual void compileScript(ErrorString*, const String& expression, const Str
ing& sourceURL, const int* executionContextId, TypeBuilder::OptOutput<TypeBuilde
r::Debugger::ScriptId>*, RefPtr<TypeBuilder::Debugger::ExceptionDetails>&) overr
ide; |
| 144 virtual void runScript(ErrorString*, const TypeBuilder::Debugger::ScriptId&,
const int* executionContextId, const String* objectGroup, const bool* doNotPaus
eOnExceptionsAndMuteConsole, RefPtr<TypeBuilder::Runtime::RemoteObject>& result,
RefPtr<TypeBuilder::Debugger::ExceptionDetails>&) OVERRIDE; | 143 virtual void runScript(ErrorString*, const TypeBuilder::Debugger::ScriptId&,
const int* executionContextId, const String* objectGroup, const bool* doNotPaus
eOnExceptionsAndMuteConsole, RefPtr<TypeBuilder::Runtime::RemoteObject>& result,
RefPtr<TypeBuilder::Debugger::ExceptionDetails>&) override; |
| 145 virtual void setOverlayMessage(ErrorString*, const String*) OVERRIDE; | 144 virtual void setOverlayMessage(ErrorString*, const String*) override; |
| 146 virtual void setVariableValue(ErrorString*, int in_scopeNumber, const String
& in_variableName, const RefPtr<JSONObject>& in_newValue, const String* in_callF
rame, const String* in_functionObjectId) OVERRIDE FINAL; | 145 virtual void setVariableValue(ErrorString*, int in_scopeNumber, const String
& in_variableName, const RefPtr<JSONObject>& in_newValue, const String* in_callF
rame, const String* in_functionObjectId) override final; |
| 147 virtual void skipStackFrames(ErrorString*, const String* pattern, const bool
* skipContentScripts) OVERRIDE FINAL; | 146 virtual void skipStackFrames(ErrorString*, const String* pattern, const bool
* skipContentScripts) override final; |
| 148 virtual void setAsyncCallStackDepth(ErrorString*, int depth) OVERRIDE FINAL; | 147 virtual void setAsyncCallStackDepth(ErrorString*, int depth) override final; |
| 149 virtual void enablePromiseTracker(ErrorString*) OVERRIDE FINAL; | 148 virtual void enablePromiseTracker(ErrorString*) override final; |
| 150 virtual void disablePromiseTracker(ErrorString*) OVERRIDE FINAL; | 149 virtual void disablePromiseTracker(ErrorString*) override final; |
| 151 virtual void getPromises(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder
::Debugger::PromiseDetails> >& promises) OVERRIDE FINAL; | 150 virtual void getPromises(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder
::Debugger::PromiseDetails> >& promises) override final; |
| 152 virtual void getPromiseById(ErrorString*, int promiseId, const String* objec
tGroup, RefPtr<TypeBuilder::Runtime::RemoteObject>& promise) OVERRIDE FINAL; | 151 virtual void getPromiseById(ErrorString*, int promiseId, const String* objec
tGroup, RefPtr<TypeBuilder::Runtime::RemoteObject>& promise) override final; |
| 153 | 152 |
| 154 void schedulePauseOnNextStatement(InspectorFrontend::Debugger::Reason::Enum
breakReason, PassRefPtr<JSONObject> data); | 153 void schedulePauseOnNextStatement(InspectorFrontend::Debugger::Reason::Enum
breakReason, PassRefPtr<JSONObject> data); |
| 155 void didInstallTimer(ExecutionContext*, int timerId, int timeout, bool singl
eShot); | 154 void didInstallTimer(ExecutionContext*, int timerId, int timeout, bool singl
eShot); |
| 156 void didRemoveTimer(ExecutionContext*, int timerId); | 155 void didRemoveTimer(ExecutionContext*, int timerId); |
| 157 bool willFireTimer(ExecutionContext*, int timerId); | 156 bool willFireTimer(ExecutionContext*, int timerId); |
| 158 void didFireTimer(); | 157 void didFireTimer(); |
| 159 void didRequestAnimationFrame(Document*, int callbackId); | 158 void didRequestAnimationFrame(Document*, int callbackId); |
| 160 void didCancelAnimationFrame(Document*, int callbackId); | 159 void didCancelAnimationFrame(Document*, int callbackId); |
| 161 bool willFireAnimationFrame(Document*, int callbackId); | 160 bool willFireAnimationFrame(Document*, int callbackId); |
| 162 void didFireAnimationFrame(); | 161 void didFireAnimationFrame(); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 210 |
| 212 virtual void startListeningScriptDebugServer() = 0; | 211 virtual void startListeningScriptDebugServer() = 0; |
| 213 virtual void stopListeningScriptDebugServer() = 0; | 212 virtual void stopListeningScriptDebugServer() = 0; |
| 214 virtual void muteConsole() = 0; | 213 virtual void muteConsole() = 0; |
| 215 virtual void unmuteConsole() = 0; | 214 virtual void unmuteConsole() = 0; |
| 216 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } | 215 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } |
| 217 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) = 0; | 216 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut
ionContextId) = 0; |
| 218 | 217 |
| 219 virtual void enable(); | 218 virtual void enable(); |
| 220 virtual void disable(); | 219 virtual void disable(); |
| 221 virtual SkipPauseRequest didPause(ScriptState*, const ScriptValue& callFrame
s, const ScriptValue& exception, const Vector<String>& hitBreakpoints) OVERRIDE
FINAL; | 220 virtual SkipPauseRequest didPause(ScriptState*, const ScriptValue& callFrame
s, const ScriptValue& exception, const Vector<String>& hitBreakpoints) override
final; |
| 222 virtual void didContinue() OVERRIDE FINAL; | 221 virtual void didContinue() override final; |
| 223 void reset(); | 222 void reset(); |
| 224 void pageDidCommitLoad(); | 223 void pageDidCommitLoad(); |
| 225 | 224 |
| 226 private: | 225 private: |
| 227 SkipPauseRequest shouldSkipExceptionPause(); | 226 SkipPauseRequest shouldSkipExceptionPause(); |
| 228 SkipPauseRequest shouldSkipStepPause(); | 227 SkipPauseRequest shouldSkipStepPause(); |
| 229 bool isTopCallFrameInFramework(); | 228 bool isTopCallFrameInFramework(); |
| 230 | 229 |
| 231 void cancelPauseOnNextStatement(); | 230 void cancelPauseOnNextStatement(); |
| 232 void addMessageToConsole(MessageSource, MessageType); | 231 void addMessageToConsole(MessageSource, MessageType); |
| 233 | 232 |
| 234 PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > currentCal
lFrames(); | 233 PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > currentCal
lFrames(); |
| 235 PassRefPtr<TypeBuilder::Debugger::StackTrace> currentAsyncStackTrace(); | 234 PassRefPtr<TypeBuilder::Debugger::StackTrace> currentAsyncStackTrace(); |
| 236 | 235 |
| 237 virtual void didParseSource(const String& scriptId, const Script&, CompileRe
sult) OVERRIDE FINAL; | 236 virtual void didParseSource(const String& scriptId, const Script&, CompileRe
sult) override final; |
| 238 virtual bool v8AsyncTaskEventsEnabled() const OVERRIDE FINAL; | 237 virtual bool v8AsyncTaskEventsEnabled() const override final; |
| 239 virtual void didReceiveV8AsyncTaskEvent(ExecutionContext*, const String& eve
ntType, const String& eventName, int id) OVERRIDE FINAL; | 238 virtual void didReceiveV8AsyncTaskEvent(ExecutionContext*, const String& eve
ntType, const String& eventName, int id) override final; |
| 240 virtual bool v8PromiseEventsEnabled() const OVERRIDE FINAL; | 239 virtual bool v8PromiseEventsEnabled() const override final; |
| 241 virtual void didReceiveV8PromiseEvent(ScriptState*, v8::Handle<v8::Object> p
romise, v8::Handle<v8::Value> parentPromise, int status) OVERRIDE FINAL; | 240 virtual void didReceiveV8PromiseEvent(ScriptState*, v8::Handle<v8::Object> p
romise, v8::Handle<v8::Value> parentPromise, int status) override final; |
| 242 | 241 |
| 243 void setPauseOnExceptionsImpl(ErrorString*, int); | 242 void setPauseOnExceptionsImpl(ErrorString*, int); |
| 244 | 243 |
| 245 PassRefPtr<TypeBuilder::Debugger::Location> resolveBreakpoint(const String&
breakpointId, const String& scriptId, const ScriptBreakpoint&, BreakpointSource)
; | 244 PassRefPtr<TypeBuilder::Debugger::Location> resolveBreakpoint(const String&
breakpointId, const String& scriptId, const ScriptBreakpoint&, BreakpointSource)
; |
| 246 void removeBreakpoint(const String& breakpointId); | 245 void removeBreakpoint(const String& breakpointId); |
| 247 void clear(); | 246 void clear(); |
| 248 bool assertPaused(ErrorString*); | 247 bool assertPaused(ErrorString*); |
| 249 void clearBreakDetails(); | 248 void clearBreakDetails(); |
| 250 | 249 |
| 251 String sourceMapURLForScript(const Script&, CompileResult); | 250 String sourceMapURLForScript(const Script&, CompileResult); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 280 bool m_skipContentScripts; | 279 bool m_skipContentScripts; |
| 281 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; | 280 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; |
| 282 OwnPtrWillBeMember<AsyncCallStackTracker> m_asyncCallStackTracker; | 281 OwnPtrWillBeMember<AsyncCallStackTracker> m_asyncCallStackTracker; |
| 283 OwnPtrWillBeMember<PromiseTracker> m_promiseTracker; | 282 OwnPtrWillBeMember<PromiseTracker> m_promiseTracker; |
| 284 }; | 283 }; |
| 285 | 284 |
| 286 } // namespace blink | 285 } // namespace blink |
| 287 | 286 |
| 288 | 287 |
| 289 #endif // !defined(InspectorDebuggerAgent_h) | 288 #endif // !defined(InspectorDebuggerAgent_h) |
| OLD | NEW |