| 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/Backend.h" |
| 8 #include "platform/inspector_protocol/Collections.h" | 9 #include "platform/inspector_protocol/Collections.h" |
| 9 #include "platform/inspector_protocol/Dispatcher.h" | |
| 10 #include "platform/inspector_protocol/Frontend.h" | 10 #include "platform/inspector_protocol/Frontend.h" |
| 11 #include "platform/inspector_protocol/String16.h" | 11 #include "platform/inspector_protocol/String16.h" |
| 12 #include "platform/v8_inspector/V8DebuggerImpl.h" | 12 #include "platform/v8_inspector/V8DebuggerImpl.h" |
| 13 #include "platform/v8_inspector/public/V8DebuggerAgent.h" | |
| 14 | 13 |
| 15 namespace blink { | 14 namespace blink { |
| 16 | 15 |
| 17 class JavaScriptCallFrame; | 16 class JavaScriptCallFrame; |
| 18 class PromiseTracker; | 17 class PromiseTracker; |
| 19 class V8InspectorSessionImpl; | 18 class V8InspectorSessionImpl; |
| 20 class V8Regex; | 19 class V8Regex; |
| 21 class V8StackTraceImpl; | 20 class V8StackTraceImpl; |
| 22 | 21 |
| 23 namespace protocol { | 22 namespace protocol { |
| 24 class DictionaryValue; | 23 class DictionaryValue; |
| 25 } | 24 } |
| 26 | 25 |
| 27 using protocol::Maybe; | 26 using protocol::Maybe; |
| 28 | 27 |
| 29 class V8DebuggerAgentImpl : public V8DebuggerAgent { | 28 class V8DebuggerAgentImpl : public protocol::Backend::Debugger { |
| 30 PROTOCOL_DISALLOW_COPY(V8DebuggerAgentImpl); | 29 PROTOCOL_DISALLOW_COPY(V8DebuggerAgentImpl); |
| 31 public: | 30 public: |
| 32 enum SkipPauseRequest { | 31 enum SkipPauseRequest { |
| 33 RequestNoSkip, | 32 RequestNoSkip, |
| 34 RequestContinue, | 33 RequestContinue, |
| 35 RequestStepInto, | 34 RequestStepInto, |
| 36 RequestStepOut, | 35 RequestStepOut, |
| 37 RequestStepFrame | 36 RequestStepFrame |
| 38 }; | 37 }; |
| 39 | 38 |
| 40 enum BreakpointSource { | 39 enum BreakpointSource { |
| 41 UserBreakpointSource, | 40 UserBreakpointSource, |
| 42 DebugCommandBreakpointSource, | 41 DebugCommandBreakpointSource, |
| 43 MonitorCommandBreakpointSource | 42 MonitorCommandBreakpointSource |
| 44 }; | 43 }; |
| 45 | 44 |
| 46 explicit V8DebuggerAgentImpl(V8InspectorSessionImpl*); | 45 V8DebuggerAgentImpl(V8InspectorSessionImpl*, protocol::Frontend::Debugger*,
protocol::DictionaryValue* state); |
| 47 ~V8DebuggerAgentImpl() override; | 46 ~V8DebuggerAgentImpl() override; |
| 48 | 47 void restore(); |
| 49 void setInspectorState(protocol::DictionaryValue*) override; | |
| 50 void setFrontend(protocol::Frontend::Debugger* frontend) override { m_fronte
nd = frontend; } | |
| 51 void clearFrontend() override; | |
| 52 void restore() override; | |
| 53 void disable(ErrorString*) override; | |
| 54 | 48 |
| 55 // Part of the protocol. | 49 // Part of the protocol. |
| 56 void enable(ErrorString*) override; | 50 void enable(ErrorString*) override; |
| 51 void disable(ErrorString*) override; |
| 57 void setBreakpointsActive(ErrorString*, bool active) override; | 52 void setBreakpointsActive(ErrorString*, bool active) override; |
| 58 void setSkipAllPauses(ErrorString*, bool skipped) override; | 53 void setSkipAllPauses(ErrorString*, bool skipped) override; |
| 59 void setBreakpointByUrl(ErrorString*, | 54 void setBreakpointByUrl(ErrorString*, |
| 60 int lineNumber, | 55 int lineNumber, |
| 61 const Maybe<String16>& optionalURL, | 56 const Maybe<String16>& optionalURL, |
| 62 const Maybe<String16>& optionalURLRegex, | 57 const Maybe<String16>& optionalURLRegex, |
| 63 const Maybe<int>& optionalColumnNumber, | 58 const Maybe<int>& optionalColumnNumber, |
| 64 const Maybe<String16>& optionalCondition, | 59 const Maybe<String16>& optionalCondition, |
| 65 String16*, | 60 String16*, |
| 66 OwnPtr<protocol::Array<protocol::Debugger::Location>>* locations) overri
de; | 61 OwnPtr<protocol::Array<protocol::Debugger::Location>>* locations) overri
de; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 #endif | 237 #endif |
| 243 protocol::Vector<OwnPtr<V8StackTraceImpl>> m_currentStacks; | 238 protocol::Vector<OwnPtr<V8StackTraceImpl>> m_currentStacks; |
| 244 OwnPtr<V8Regex> m_blackboxPattern; | 239 OwnPtr<V8Regex> m_blackboxPattern; |
| 245 protocol::HashMap<String16, protocol::Vector<std::pair<int, int>>> m_blackbo
xedPositions; | 240 protocol::HashMap<String16, protocol::Vector<std::pair<int, int>>> m_blackbo
xedPositions; |
| 246 }; | 241 }; |
| 247 | 242 |
| 248 } // namespace blink | 243 } // namespace blink |
| 249 | 244 |
| 250 | 245 |
| 251 #endif // V8DebuggerAgentImpl_h | 246 #endif // V8DebuggerAgentImpl_h |
| OLD | NEW |