Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: src/inspector/v8-inspector-session-impl.h

Issue 2905543004: [inspector] Prepare some methods in V8InspectorImpl to multiple sessions (Closed)
Patch Set: rebased Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/inspector/v8-inspector-impl.cc ('k') | src/inspector/v8-inspector-session-impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project 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 V8_INSPECTOR_V8INSPECTORSESSIONIMPL_H_ 5 #ifndef V8_INSPECTOR_V8INSPECTORSESSIONIMPL_H_
6 #define V8_INSPECTOR_V8INSPECTORSESSIONIMPL_H_ 6 #define V8_INSPECTOR_V8INSPECTORSESSIONIMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/base/macros.h" 10 #include "src/base/macros.h"
(...skipping 14 matching lines...) Expand all
25 class V8ProfilerAgentImpl; 25 class V8ProfilerAgentImpl;
26 class V8RuntimeAgentImpl; 26 class V8RuntimeAgentImpl;
27 class V8SchemaAgentImpl; 27 class V8SchemaAgentImpl;
28 28
29 using protocol::Response; 29 using protocol::Response;
30 30
31 class V8InspectorSessionImpl : public V8InspectorSession, 31 class V8InspectorSessionImpl : public V8InspectorSession,
32 public protocol::FrontendChannel { 32 public protocol::FrontendChannel {
33 public: 33 public:
34 static std::unique_ptr<V8InspectorSessionImpl> create( 34 static std::unique_ptr<V8InspectorSessionImpl> create(
35 V8InspectorImpl*, int contextGroupId, V8Inspector::Channel*, 35 V8InspectorImpl*, int contextGroupId, int sessionId,
36 const StringView& state); 36 V8Inspector::Channel*, const StringView& state);
37 ~V8InspectorSessionImpl(); 37 ~V8InspectorSessionImpl();
38 38
39 V8InspectorImpl* inspector() const { return m_inspector; } 39 V8InspectorImpl* inspector() const { return m_inspector; }
40 V8ConsoleAgentImpl* consoleAgent() { return m_consoleAgent.get(); } 40 V8ConsoleAgentImpl* consoleAgent() { return m_consoleAgent.get(); }
41 V8DebuggerAgentImpl* debuggerAgent() { return m_debuggerAgent.get(); } 41 V8DebuggerAgentImpl* debuggerAgent() { return m_debuggerAgent.get(); }
42 V8SchemaAgentImpl* schemaAgent() { return m_schemaAgent.get(); } 42 V8SchemaAgentImpl* schemaAgent() { return m_schemaAgent.get(); }
43 V8ProfilerAgentImpl* profilerAgent() { return m_profilerAgent.get(); } 43 V8ProfilerAgentImpl* profilerAgent() { return m_profilerAgent.get(); }
44 V8RuntimeAgentImpl* runtimeAgent() { return m_runtimeAgent.get(); } 44 V8RuntimeAgentImpl* runtimeAgent() { return m_runtimeAgent.get(); }
45 int contextGroupId() const { return m_contextGroupId; } 45 int contextGroupId() const { return m_contextGroupId; }
46 int sessionId() const { return m_sessionId; }
46 47
47 Response findInjectedScript(int contextId, InjectedScript*&); 48 Response findInjectedScript(int contextId, InjectedScript*&);
48 Response findInjectedScript(RemoteObjectIdBase*, InjectedScript*&); 49 Response findInjectedScript(RemoteObjectIdBase*, InjectedScript*&);
49 void reset(); 50 void reset();
50 void discardInjectedScripts(); 51 void discardInjectedScripts();
51 void reportAllContexts(V8RuntimeAgentImpl*); 52 void reportAllContexts(V8RuntimeAgentImpl*);
52 void setCustomObjectFormatterEnabled(bool); 53 void setCustomObjectFormatterEnabled(bool);
53 std::unique_ptr<protocol::Runtime::RemoteObject> wrapObject( 54 std::unique_ptr<protocol::Runtime::RemoteObject> wrapObject(
54 v8::Local<v8::Context>, v8::Local<v8::Value>, const String16& groupName, 55 v8::Local<v8::Context>, v8::Local<v8::Value>, const String16& groupName,
55 bool generatePreview); 56 bool generatePreview);
(...skipping 28 matching lines...) Expand all
84 v8::Local<v8::Value>*, v8::Local<v8::Context>*, 85 v8::Local<v8::Value>*, v8::Local<v8::Context>*,
85 std::unique_ptr<StringBuffer>* objectGroup) override; 86 std::unique_ptr<StringBuffer>* objectGroup) override;
86 std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject( 87 std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject(
87 v8::Local<v8::Context>, v8::Local<v8::Value>, 88 v8::Local<v8::Context>, v8::Local<v8::Value>,
88 const StringView& groupName) override; 89 const StringView& groupName) override;
89 90
90 V8InspectorSession::Inspectable* inspectedObject(unsigned num); 91 V8InspectorSession::Inspectable* inspectedObject(unsigned num);
91 static const unsigned kInspectedObjectBufferSize = 5; 92 static const unsigned kInspectedObjectBufferSize = 5;
92 93
93 private: 94 private:
94 V8InspectorSessionImpl(V8InspectorImpl*, int contextGroupId, 95 V8InspectorSessionImpl(V8InspectorImpl*, int contextGroupId, int sessionId,
95 V8Inspector::Channel*, const StringView& state); 96 V8Inspector::Channel*, const StringView& state);
96 protocol::DictionaryValue* agentState(const String16& name); 97 protocol::DictionaryValue* agentState(const String16& name);
97 98
98 // protocol::FrontendChannel implementation. 99 // protocol::FrontendChannel implementation.
99 void sendProtocolResponse( 100 void sendProtocolResponse(
100 int callId, std::unique_ptr<protocol::Serializable> message) override; 101 int callId, std::unique_ptr<protocol::Serializable> message) override;
101 void sendProtocolNotification( 102 void sendProtocolNotification(
102 std::unique_ptr<protocol::Serializable> message) override; 103 std::unique_ptr<protocol::Serializable> message) override;
103 void flushProtocolNotifications() override; 104 void flushProtocolNotifications() override;
104 105
105 int m_contextGroupId; 106 int m_contextGroupId;
107 int m_sessionId;
106 V8InspectorImpl* m_inspector; 108 V8InspectorImpl* m_inspector;
107 V8Inspector::Channel* m_channel; 109 V8Inspector::Channel* m_channel;
108 bool m_customObjectFormatterEnabled; 110 bool m_customObjectFormatterEnabled;
109 111
110 protocol::UberDispatcher m_dispatcher; 112 protocol::UberDispatcher m_dispatcher;
111 std::unique_ptr<protocol::DictionaryValue> m_state; 113 std::unique_ptr<protocol::DictionaryValue> m_state;
112 114
113 std::unique_ptr<V8RuntimeAgentImpl> m_runtimeAgent; 115 std::unique_ptr<V8RuntimeAgentImpl> m_runtimeAgent;
114 std::unique_ptr<V8DebuggerAgentImpl> m_debuggerAgent; 116 std::unique_ptr<V8DebuggerAgentImpl> m_debuggerAgent;
115 std::unique_ptr<V8HeapProfilerAgentImpl> m_heapProfilerAgent; 117 std::unique_ptr<V8HeapProfilerAgentImpl> m_heapProfilerAgent;
116 std::unique_ptr<V8ProfilerAgentImpl> m_profilerAgent; 118 std::unique_ptr<V8ProfilerAgentImpl> m_profilerAgent;
117 std::unique_ptr<V8ConsoleAgentImpl> m_consoleAgent; 119 std::unique_ptr<V8ConsoleAgentImpl> m_consoleAgent;
118 std::unique_ptr<V8SchemaAgentImpl> m_schemaAgent; 120 std::unique_ptr<V8SchemaAgentImpl> m_schemaAgent;
119 std::vector<std::unique_ptr<V8InspectorSession::Inspectable>> 121 std::vector<std::unique_ptr<V8InspectorSession::Inspectable>>
120 m_inspectedObjects; 122 m_inspectedObjects;
121 123
122 DISALLOW_COPY_AND_ASSIGN(V8InspectorSessionImpl); 124 DISALLOW_COPY_AND_ASSIGN(V8InspectorSessionImpl);
123 }; 125 };
124 126
125 } // namespace v8_inspector 127 } // namespace v8_inspector
126 128
127 #endif // V8_INSPECTOR_V8INSPECTORSESSIONIMPL_H_ 129 #endif // V8_INSPECTOR_V8INSPECTORSESSIONIMPL_H_
OLDNEW
« no previous file with comments | « src/inspector/v8-inspector-impl.cc ('k') | src/inspector/v8-inspector-session-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698