5 #ifndef V8_INSPECTOR_V8_INSPECTOR_SESSION_IMPL_H_ 6 #define V8_INSPECTOR_V8_INSPECTOR_SESSION_IMPL_H_ 10 #include "src/base/macros.h" 11 #include "src/inspector/protocol/Forward.h" 12 #include "src/inspector/protocol/Runtime.h" 13 #include "src/inspector/protocol/Schema.h" 15 #include "include/v8-inspector.h" 20 class RemoteObjectIdBase;
21 class V8ConsoleAgentImpl;
22 class V8DebuggerAgentImpl;
23 class V8InspectorImpl;
24 class V8HeapProfilerAgentImpl;
25 class V8ProfilerAgentImpl;
26 class V8RuntimeAgentImpl;
27 class V8SchemaAgentImpl;
29 using protocol::Response;
32 public protocol::FrontendChannel {
34 static std::unique_ptr<V8InspectorSessionImpl> create(
45 int contextGroupId()
const {
return m_contextGroupId; }
46 int sessionId()
const {
return m_sessionId; }
51 void discardInjectedScripts();
53 void setCustomObjectFormatterEnabled(
bool);
54 std::unique_ptr<protocol::Runtime::RemoteObject> wrapObject(
56 bool generatePreview);
57 std::unique_ptr<protocol::Runtime::RemoteObject> wrapTable(
60 std::vector<std::unique_ptr<protocol::Schema::Domain>> supportedDomainsImpl();
63 void releaseObjectGroup(
const String16& objectGroup);
66 void dispatchProtocolMessage(
const StringView& message)
override;
67 std::unique_ptr<StringBuffer> stateJSON()
override;
68 std::vector<std::unique_ptr<protocol::Schema::API::Domain>> supportedDomains()
70 void addInspectedObject(
71 std::unique_ptr<V8InspectorSession::Inspectable>)
override;
72 void schedulePauseOnNextStatement(
const StringView& breakReason,
74 void cancelPauseOnNextStatement()
override;
75 void breakProgram(
const StringView& breakReason,
77 void setSkipAllPauses(
bool)
override;
78 void resume()
override;
79 void stepOver()
override;
80 std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>>
82 bool caseSensitive,
bool isRegex)
override;
83 void releaseObjectGroup(
const StringView& objectGroup)
override;
84 bool unwrapObject(std::unique_ptr<StringBuffer>*,
const StringView& objectId,
86 std::unique_ptr<StringBuffer>* objectGroup)
override;
87 std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject(
89 bool generatePreview)
override;
92 static const unsigned kInspectedObjectBufferSize = 5;
97 protocol::DictionaryValue* agentState(
const String16& name);
100 void sendProtocolResponse(
101 int callId, std::unique_ptr<protocol::Serializable> message)
override;
102 void sendProtocolNotification(
103 std::unique_ptr<protocol::Serializable> message)
override;
104 void fallThrough(
int callId,
const String16& method,
106 void flushProtocolNotifications()
override;
108 int m_contextGroupId;
112 bool m_customObjectFormatterEnabled;
114 protocol::UberDispatcher m_dispatcher;
115 std::unique_ptr<protocol::DictionaryValue> m_state;
117 std::unique_ptr<V8RuntimeAgentImpl> m_runtimeAgent;
118 std::unique_ptr<V8DebuggerAgentImpl> m_debuggerAgent;
119 std::unique_ptr<V8HeapProfilerAgentImpl> m_heapProfilerAgent;
120 std::unique_ptr<V8ProfilerAgentImpl> m_profilerAgent;
121 std::unique_ptr<V8ConsoleAgentImpl> m_consoleAgent;
122 std::unique_ptr<V8SchemaAgentImpl> m_schemaAgent;
123 std::vector<std::unique_ptr<V8InspectorSession::Inspectable>>
131 #endif // V8_INSPECTOR_V8_INSPECTOR_SESSION_IMPL_H_