OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 V8InspectorSessionImpl_h | 5 #ifndef V8InspectorSessionImpl_h |
6 #define V8InspectorSessionImpl_h | 6 #define V8InspectorSessionImpl_h |
7 | 7 |
8 #include "platform/inspector_protocol/InspectorProtocol.h" | 8 #include "platform/inspector_protocol/InspectorProtocol.h" |
9 #include "platform/v8_inspector/protocol/Runtime.h" | 9 #include "platform/v8_inspector/protocol/Runtime.h" |
| 10 #include "platform/v8_inspector/protocol/Schema.h" |
10 #include "platform/v8_inspector/public/V8InspectorSession.h" | 11 #include "platform/v8_inspector/public/V8InspectorSession.h" |
11 | 12 |
12 #include <v8.h> | 13 #include <v8.h> |
13 | 14 |
14 #include <vector> | 15 #include <vector> |
15 | 16 |
16 namespace v8_inspector { | 17 namespace v8_inspector { |
17 | 18 |
18 class InjectedScript; | 19 class InjectedScript; |
19 class RemoteObjectIdBase; | 20 class RemoteObjectIdBase; |
20 class V8ConsoleAgentImpl; | 21 class V8ConsoleAgentImpl; |
21 class V8DebuggerAgentImpl; | 22 class V8DebuggerAgentImpl; |
22 class V8InspectorImpl; | 23 class V8InspectorImpl; |
23 class V8HeapProfilerAgentImpl; | 24 class V8HeapProfilerAgentImpl; |
24 class V8ProfilerAgentImpl; | 25 class V8ProfilerAgentImpl; |
25 class V8RuntimeAgentImpl; | 26 class V8RuntimeAgentImpl; |
| 27 class V8SchemaAgentImpl; |
26 | 28 |
27 namespace protocol = blink::protocol; | 29 namespace protocol = blink::protocol; |
28 | 30 |
29 class V8InspectorSessionImpl : public V8InspectorSession { | 31 class V8InspectorSessionImpl : public V8InspectorSession { |
30 PROTOCOL_DISALLOW_COPY(V8InspectorSessionImpl); | 32 PROTOCOL_DISALLOW_COPY(V8InspectorSessionImpl); |
31 public: | 33 public: |
32 static std::unique_ptr<V8InspectorSessionImpl> create(V8InspectorImpl*, int
contextGroupId, protocol::FrontendChannel*, const String16* state); | 34 static std::unique_ptr<V8InspectorSessionImpl> create(V8InspectorImpl*, int
contextGroupId, protocol::FrontendChannel*, const String16* state); |
33 ~V8InspectorSessionImpl(); | 35 ~V8InspectorSessionImpl(); |
34 | 36 |
35 V8InspectorImpl* inspector() const { return m_inspector; } | 37 V8InspectorImpl* inspector() const { return m_inspector; } |
36 V8ConsoleAgentImpl* consoleAgent() { return m_consoleAgent.get(); } | 38 V8ConsoleAgentImpl* consoleAgent() { return m_consoleAgent.get(); } |
37 V8DebuggerAgentImpl* debuggerAgent() { return m_debuggerAgent.get(); } | 39 V8DebuggerAgentImpl* debuggerAgent() { return m_debuggerAgent.get(); } |
| 40 V8SchemaAgentImpl* schemaAgent() { return m_schemaAgent.get(); } |
38 V8ProfilerAgentImpl* profilerAgent() { return m_profilerAgent.get(); } | 41 V8ProfilerAgentImpl* profilerAgent() { return m_profilerAgent.get(); } |
39 V8RuntimeAgentImpl* runtimeAgent() { return m_runtimeAgent.get(); } | 42 V8RuntimeAgentImpl* runtimeAgent() { return m_runtimeAgent.get(); } |
40 int contextGroupId() const { return m_contextGroupId; } | 43 int contextGroupId() const { return m_contextGroupId; } |
41 | 44 |
42 InjectedScript* findInjectedScript(ErrorString*, int contextId); | 45 InjectedScript* findInjectedScript(ErrorString*, int contextId); |
43 InjectedScript* findInjectedScript(ErrorString*, RemoteObjectIdBase*); | 46 InjectedScript* findInjectedScript(ErrorString*, RemoteObjectIdBase*); |
44 void reset(); | 47 void reset(); |
45 void discardInjectedScripts(); | 48 void discardInjectedScripts(); |
46 void reportAllContexts(V8RuntimeAgentImpl*); | 49 void reportAllContexts(V8RuntimeAgentImpl*); |
47 void setCustomObjectFormatterEnabled(bool); | 50 void setCustomObjectFormatterEnabled(bool); |
48 std::unique_ptr<protocol::Runtime::RemoteObject> wrapObject(v8::Local<v8::Co
ntext>, v8::Local<v8::Value>, const String16& groupName, bool generatePreview); | 51 std::unique_ptr<protocol::Runtime::RemoteObject> wrapObject(v8::Local<v8::Co
ntext>, v8::Local<v8::Value>, const String16& groupName, bool generatePreview); |
49 std::unique_ptr<protocol::Runtime::RemoteObject> wrapTable(v8::Local<v8::Con
text>, v8::Local<v8::Value> table, v8::Local<v8::Value> columns); | 52 std::unique_ptr<protocol::Runtime::RemoteObject> wrapTable(v8::Local<v8::Con
text>, v8::Local<v8::Value> table, v8::Local<v8::Value> columns); |
| 53 std::vector<std::unique_ptr<protocol::Schema::Domain>> supportedDomainsImpl(
); |
50 | 54 |
51 // V8InspectorSession implementation. | 55 // V8InspectorSession implementation. |
52 void dispatchProtocolMessage(const String16& message) override; | 56 void dispatchProtocolMessage(const String16& message) override; |
53 String16 stateJSON() override; | 57 String16 stateJSON() override; |
| 58 std::unique_ptr<protocol::Array<protocol::Schema::API::Domain>> supportedDom
ains() override; |
54 void addInspectedObject(std::unique_ptr<V8InspectorSession::Inspectable>) ov
erride; | 59 void addInspectedObject(std::unique_ptr<V8InspectorSession::Inspectable>) ov
erride; |
55 void schedulePauseOnNextStatement(const String16& breakReason, const String1
6& breakDetails) override; | 60 void schedulePauseOnNextStatement(const String16& breakReason, const String1
6& breakDetails) override; |
56 void cancelPauseOnNextStatement() override; | 61 void cancelPauseOnNextStatement() override; |
57 void breakProgram(const String16& breakReason, const String16& breakDetails)
override; | 62 void breakProgram(const String16& breakReason, const String16& breakDetails)
override; |
58 void setSkipAllPauses(bool) override; | 63 void setSkipAllPauses(bool) override; |
59 void resume() override; | 64 void resume() override; |
60 void stepOver() override; | 65 void stepOver() override; |
61 std::unique_ptr<protocol::Array<protocol::Debugger::API::SearchMatch>> searc
hInTextByLines(const String16& text, const String16& query, bool caseSensitive,
bool isRegex) override; | 66 std::unique_ptr<protocol::Array<protocol::Debugger::API::SearchMatch>> searc
hInTextByLines(const String16& text, const String16& query, bool caseSensitive,
bool isRegex) override; |
62 void releaseObjectGroup(const String16& objectGroup) override; | 67 void releaseObjectGroup(const String16& objectGroup) override; |
63 bool unwrapObject(ErrorString*, const String16& objectId, v8::Local<v8::Valu
e>*, v8::Local<v8::Context>*, String16* objectGroup) override; | 68 bool unwrapObject(ErrorString*, const String16& objectId, v8::Local<v8::Valu
e>*, v8::Local<v8::Context>*, String16* objectGroup) override; |
(...skipping 11 matching lines...) Expand all Loading... |
75 bool m_customObjectFormatterEnabled; | 80 bool m_customObjectFormatterEnabled; |
76 | 81 |
77 protocol::UberDispatcher m_dispatcher; | 82 protocol::UberDispatcher m_dispatcher; |
78 std::unique_ptr<protocol::DictionaryValue> m_state; | 83 std::unique_ptr<protocol::DictionaryValue> m_state; |
79 | 84 |
80 std::unique_ptr<V8RuntimeAgentImpl> m_runtimeAgent; | 85 std::unique_ptr<V8RuntimeAgentImpl> m_runtimeAgent; |
81 std::unique_ptr<V8DebuggerAgentImpl> m_debuggerAgent; | 86 std::unique_ptr<V8DebuggerAgentImpl> m_debuggerAgent; |
82 std::unique_ptr<V8HeapProfilerAgentImpl> m_heapProfilerAgent; | 87 std::unique_ptr<V8HeapProfilerAgentImpl> m_heapProfilerAgent; |
83 std::unique_ptr<V8ProfilerAgentImpl> m_profilerAgent; | 88 std::unique_ptr<V8ProfilerAgentImpl> m_profilerAgent; |
84 std::unique_ptr<V8ConsoleAgentImpl> m_consoleAgent; | 89 std::unique_ptr<V8ConsoleAgentImpl> m_consoleAgent; |
| 90 std::unique_ptr<V8SchemaAgentImpl> m_schemaAgent; |
85 std::vector<std::unique_ptr<V8InspectorSession::Inspectable>> m_inspectedObj
ects; | 91 std::vector<std::unique_ptr<V8InspectorSession::Inspectable>> m_inspectedObj
ects; |
86 }; | 92 }; |
87 | 93 |
88 } // namespace v8_inspector | 94 } // namespace v8_inspector |
89 | 95 |
90 #endif | 96 #endif |
OLD | NEW |