| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8DebuggerAgentImpl_h | 5 #ifndef V8DebuggerAgentImpl_h |
| 6 #define V8DebuggerAgentImpl_h | 6 #define V8DebuggerAgentImpl_h |
| 7 | 7 |
| 8 #include "platform/inspector_protocol/Dispatcher.h" | 8 #include "platform/inspector_protocol/Dispatcher.h" |
| 9 #include "platform/inspector_protocol/Frontend.h" | 9 #include "platform/inspector_protocol/Frontend.h" |
| 10 #include "platform/v8_inspector/ScriptBreakpoint.h" | 10 #include "platform/v8_inspector/ScriptBreakpoint.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 class JavaScriptCallFrame; | 28 class JavaScriptCallFrame; |
| 29 class JSONObject; | 29 class JSONObject; |
| 30 class PromiseTracker; | 30 class PromiseTracker; |
| 31 class RemoteCallFrameId; | 31 class RemoteCallFrameId; |
| 32 class ScriptRegexp; | 32 class ScriptRegexp; |
| 33 class V8AsyncCallTracker; | 33 class V8AsyncCallTracker; |
| 34 class V8StackTraceImpl; | 34 class V8StackTraceImpl; |
| 35 | 35 |
| 36 typedef String ErrorString; | 36 typedef String ErrorString; |
| 37 | 37 |
| 38 using protocol::OptionalValue; | 38 using protocol::Maybe; |
| 39 | 39 |
| 40 class V8DebuggerAgentImpl : public V8DebuggerAgent { | 40 class V8DebuggerAgentImpl : public V8DebuggerAgent { |
| 41 WTF_MAKE_NONCOPYABLE(V8DebuggerAgentImpl); | 41 WTF_MAKE_NONCOPYABLE(V8DebuggerAgentImpl); |
| 42 USING_FAST_MALLOC(V8DebuggerAgentImpl); | 42 USING_FAST_MALLOC(V8DebuggerAgentImpl); |
| 43 public: | 43 public: |
| 44 enum SkipPauseRequest { | 44 enum SkipPauseRequest { |
| 45 RequestNoSkip, | 45 RequestNoSkip, |
| 46 RequestContinue, | 46 RequestContinue, |
| 47 RequestStepInto, | 47 RequestStepInto, |
| 48 RequestStepOut, | 48 RequestStepOut, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 66 | 66 |
| 67 bool isPaused() override; | 67 bool isPaused() override; |
| 68 | 68 |
| 69 // Part of the protocol. | 69 // Part of the protocol. |
| 70 void enable(ErrorString*) override; | 70 void enable(ErrorString*) override; |
| 71 void setBreakpointsActive(ErrorString*, bool active) override; | 71 void setBreakpointsActive(ErrorString*, bool active) override; |
| 72 void setSkipAllPauses(ErrorString*, bool skipped) override; | 72 void setSkipAllPauses(ErrorString*, bool skipped) override; |
| 73 | 73 |
| 74 void setBreakpointByUrl(ErrorString*, | 74 void setBreakpointByUrl(ErrorString*, |
| 75 int lineNumber, | 75 int lineNumber, |
| 76 const OptionalValue<String>& optionalURL, | 76 const Maybe<String>& optionalURL, |
| 77 const OptionalValue<String>& optionalURLRegex, | 77 const Maybe<String>& optionalURLRegex, |
| 78 const OptionalValue<int>& optionalColumnNumber, | 78 const Maybe<int>& optionalColumnNumber, |
| 79 const OptionalValue<String>& optionalCondition, | 79 const Maybe<String>& optionalCondition, |
| 80 protocol::Debugger::BreakpointId*, | 80 protocol::Debugger::BreakpointId*, |
| 81 OwnPtr<protocol::Array<protocol::Debugger::Location>>* locations) overri
de; | 81 OwnPtr<protocol::Array<protocol::Debugger::Location>>* locations) overri
de; |
| 82 void setBreakpoint(ErrorString*, | 82 void setBreakpoint(ErrorString*, |
| 83 PassOwnPtr<protocol::Debugger::Location>, | 83 PassOwnPtr<protocol::Debugger::Location>, |
| 84 const OptionalValue<String>& optionalCondition, | 84 const Maybe<String>& optionalCondition, |
| 85 protocol::Debugger::BreakpointId*, | 85 protocol::Debugger::BreakpointId*, |
| 86 OwnPtr<protocol::Debugger::Location>* actualLocation) override; | 86 OwnPtr<protocol::Debugger::Location>* actualLocation) override; |
| 87 void removeBreakpoint(ErrorString*, const String& breakpointId) override; | 87 void removeBreakpoint(ErrorString*, const String& breakpointId) override; |
| 88 void continueToLocation(ErrorString*, | 88 void continueToLocation(ErrorString*, |
| 89 PassOwnPtr<protocol::Debugger::Location>, | 89 PassOwnPtr<protocol::Debugger::Location>, |
| 90 const OptionalValue<bool>& interstateLocationOpt) override; | 90 const Maybe<bool>& interstateLocationOpt) override; |
| 91 void getStepInPositions(ErrorString*, | 91 void getStepInPositions(ErrorString*, |
| 92 const String& callFrameId, | 92 const String& callFrameId, |
| 93 OwnPtr<protocol::Array<protocol::Debugger::Location>>* positions) overri
de; | 93 Maybe<protocol::Array<protocol::Debugger::Location>>* positions) overrid
e; |
| 94 void getBacktrace(ErrorString*, | 94 void getBacktrace(ErrorString*, |
| 95 OwnPtr<protocol::Array<protocol::Debugger::CallFrame>>*, | 95 OwnPtr<protocol::Array<protocol::Debugger::CallFrame>>*, |
| 96 OwnPtr<protocol::Debugger::StackTrace>*) override; | 96 Maybe<protocol::Debugger::StackTrace>*) override; |
| 97 void searchInContent(ErrorString*, | 97 void searchInContent(ErrorString*, |
| 98 const String& scriptId, | 98 const String& scriptId, |
| 99 const String& query, | 99 const String& query, |
| 100 const OptionalValue<bool>& optionalCaseSensitive, | 100 const Maybe<bool>& optionalCaseSensitive, |
| 101 const OptionalValue<bool>& optionalIsRegex, | 101 const Maybe<bool>& optionalIsRegex, |
| 102 OwnPtr<protocol::Array<protocol::Debugger::SearchMatch>>*) override; | 102 OwnPtr<protocol::Array<protocol::Debugger::SearchMatch>>*) override; |
| 103 void canSetScriptSource(ErrorString*, bool* result) override { *result = tru
e; } | 103 void canSetScriptSource(ErrorString*, bool* result) override { *result = tru
e; } |
| 104 void setScriptSource(ErrorString*, | 104 void setScriptSource(ErrorString*, |
| 105 const String& inScriptId, | 105 const String& inScriptId, |
| 106 const String& inScriptSource, | 106 const String& inScriptSource, |
| 107 const OptionalValue<bool>& inPreview, | 107 const Maybe<bool>& inPreview, |
| 108 OwnPtr<protocol::Array<protocol::Debugger::CallFrame>>* optOutCallFrames
, | 108 Maybe<protocol::Array<protocol::Debugger::CallFrame>>* optOutCallFrames, |
| 109 OptionalValue<bool>* optOutStackChanged, | 109 Maybe<bool>* optOutStackChanged, |
| 110 OwnPtr<protocol::Debugger::StackTrace>* optOutAsyncStackTrace, | 110 Maybe<protocol::Debugger::StackTrace>* optOutAsyncStackTrace, |
| 111 OwnPtr<protocol::Debugger::SetScriptSourceError>* optOutCompileError) ov
erride; | 111 Maybe<protocol::Debugger::SetScriptSourceError>* optOutCompileError) ove
rride; |
| 112 void restartFrame(ErrorString*, | 112 void restartFrame(ErrorString*, |
| 113 const String& callFrameId, | 113 const String& callFrameId, |
| 114 OwnPtr<protocol::Array<protocol::Debugger::CallFrame>>* newCallFrames, | 114 OwnPtr<protocol::Array<protocol::Debugger::CallFrame>>* newCallFrames, |
| 115 OwnPtr<protocol::Debugger::StackTrace>* asyncStackTrace) override; | 115 Maybe<protocol::Debugger::StackTrace>* asyncStackTrace) override; |
| 116 void getScriptSource(ErrorString*, const String& scriptId, String* scriptSou
rce) override; | 116 void getScriptSource(ErrorString*, const String& scriptId, String* scriptSou
rce) override; |
| 117 void getFunctionDetails(ErrorString*, | 117 void getFunctionDetails(ErrorString*, |
| 118 const String& functionId, | 118 const String& functionId, |
| 119 OwnPtr<protocol::Debugger::FunctionDetails>*) override; | 119 OwnPtr<protocol::Debugger::FunctionDetails>*) override; |
| 120 void getGeneratorObjectDetails(ErrorString*, | 120 void getGeneratorObjectDetails(ErrorString*, |
| 121 const String& objectId, | 121 const String& objectId, |
| 122 OwnPtr<protocol::Debugger::GeneratorObjectDetails>*) override; | 122 OwnPtr<protocol::Debugger::GeneratorObjectDetails>*) override; |
| 123 void getCollectionEntries(ErrorString*, | 123 void getCollectionEntries(ErrorString*, |
| 124 const String& objectId, | 124 const String& objectId, |
| 125 OwnPtr<protocol::Array<protocol::Debugger::CollectionEntry>>*) override; | 125 OwnPtr<protocol::Array<protocol::Debugger::CollectionEntry>>*) override; |
| 126 void pause(ErrorString*) override; | 126 void pause(ErrorString*) override; |
| 127 void resume(ErrorString*) override; | 127 void resume(ErrorString*) override; |
| 128 void stepOver(ErrorString*) override; | 128 void stepOver(ErrorString*) override; |
| 129 void stepInto(ErrorString*) override; | 129 void stepInto(ErrorString*) override; |
| 130 void stepOut(ErrorString*) override; | 130 void stepOut(ErrorString*) override; |
| 131 void stepIntoAsync(ErrorString*) override; | 131 void stepIntoAsync(ErrorString*) override; |
| 132 void setPauseOnExceptions(ErrorString*, const String& pauseState) override; | 132 void setPauseOnExceptions(ErrorString*, const String& pauseState) override; |
| 133 void evaluateOnCallFrame(ErrorString*, | 133 void evaluateOnCallFrame(ErrorString*, |
| 134 const String& callFrameId, | 134 const String& callFrameId, |
| 135 const String& expression, | 135 const String& expression, |
| 136 const OptionalValue<String>& objectGroup, | 136 const Maybe<String>& objectGroup, |
| 137 const OptionalValue<bool>& includeCommandLineAPI, | 137 const Maybe<bool>& includeCommandLineAPI, |
| 138 const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole, | 138 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, |
| 139 const OptionalValue<bool>& returnByValue, | 139 const Maybe<bool>& returnByValue, |
| 140 const OptionalValue<bool>& generatePreview, | 140 const Maybe<bool>& generatePreview, |
| 141 OwnPtr<protocol::Runtime::RemoteObject>* result, | 141 OwnPtr<protocol::Runtime::RemoteObject>* result, |
| 142 OptionalValue<bool>* wasThrown, | 142 Maybe<bool>* wasThrown, |
| 143 OwnPtr<protocol::Runtime::ExceptionDetails>*) override; | 143 Maybe<protocol::Runtime::ExceptionDetails>*) override; |
| 144 void setVariableValue(ErrorString*, | 144 void setVariableValue(ErrorString*, |
| 145 int scopeNumber, | 145 int scopeNumber, |
| 146 const String& variableName, | 146 const String& variableName, |
| 147 PassOwnPtr<protocol::Runtime::CallArgument> newValue, | 147 PassOwnPtr<protocol::Runtime::CallArgument> newValue, |
| 148 const OptionalValue<String>& callFrame, | 148 const Maybe<String>& callFrame, |
| 149 const OptionalValue<String>& functionObjectId) override; | 149 const Maybe<String>& functionObjectId) override; |
| 150 void setAsyncCallStackDepth(ErrorString*, int depth) override; | 150 void setAsyncCallStackDepth(ErrorString*, int depth) override; |
| 151 void enablePromiseTracker(ErrorString*, | 151 void enablePromiseTracker(ErrorString*, |
| 152 const OptionalValue<bool>& captureStacks) override; | 152 const Maybe<bool>& captureStacks) override; |
| 153 void disablePromiseTracker(ErrorString*) override; | 153 void disablePromiseTracker(ErrorString*) override; |
| 154 void getPromiseById(ErrorString*, | 154 void getPromiseById(ErrorString*, |
| 155 int promiseId, | 155 int promiseId, |
| 156 const OptionalValue<String>& objectGroup, | 156 const Maybe<String>& objectGroup, |
| 157 OwnPtr<protocol::Runtime::RemoteObject>* promise) override; | 157 OwnPtr<protocol::Runtime::RemoteObject>* promise) override; |
| 158 void flushAsyncOperationEvents(ErrorString*) override; | 158 void flushAsyncOperationEvents(ErrorString*) override; |
| 159 void setAsyncOperationBreakpoint(ErrorString*, int operationId) override; | 159 void setAsyncOperationBreakpoint(ErrorString*, int operationId) override; |
| 160 void removeAsyncOperationBreakpoint(ErrorString*, int operationId) override; | 160 void removeAsyncOperationBreakpoint(ErrorString*, int operationId) override; |
| 161 void setBlackboxedRanges(ErrorString*, | 161 void setBlackboxedRanges(ErrorString*, |
| 162 const String& scriptId, | 162 const String& scriptId, |
| 163 PassOwnPtr<protocol::Array<protocol::Debugger::ScriptPosition>> position
s) override; | 163 PassOwnPtr<protocol::Array<protocol::Debugger::ScriptPosition>> position
s) override; |
| 164 | 164 |
| 165 void schedulePauseOnNextStatement(const String& breakReason, PassRefPtr<JSON
Object> data) override; | 165 void schedulePauseOnNextStatement(const String& breakReason, PassRefPtr<JSON
Object> data) override; |
| 166 void cancelPauseOnNextStatement() override; | 166 void cancelPauseOnNextStatement() override; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 int m_currentAsyncOperationId; | 288 int m_currentAsyncOperationId; |
| 289 bool m_pendingTraceAsyncOperationCompleted; | 289 bool m_pendingTraceAsyncOperationCompleted; |
| 290 bool m_startingStepIntoAsync; | 290 bool m_startingStepIntoAsync; |
| 291 HashMap<String, Vector<std::pair<int, int>>> m_blackboxedPositions; | 291 HashMap<String, Vector<std::pair<int, int>>> m_blackboxedPositions; |
| 292 }; | 292 }; |
| 293 | 293 |
| 294 } // namespace blink | 294 } // namespace blink |
| 295 | 295 |
| 296 | 296 |
| 297 #endif // V8DebuggerAgentImpl_h | 297 #endif // V8DebuggerAgentImpl_h |
| OLD | NEW |