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

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

Issue 2467853003: [inspector] migrate Runtime to new style (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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
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"
11 #include "src/inspector/protocol/Forward.h" 11 #include "src/inspector/protocol/Forward.h"
12 #include "src/inspector/protocol/Runtime.h" 12 #include "src/inspector/protocol/Runtime.h"
13 #include "src/inspector/protocol/Schema.h" 13 #include "src/inspector/protocol/Schema.h"
14 14
15 #include "include/v8-inspector.h" 15 #include "include/v8-inspector.h"
16 16
17 namespace v8_inspector { 17 namespace v8_inspector {
18 18
19 class InjectedScript; 19 class InjectedScript;
20 class RemoteObjectIdBase; 20 class RemoteObjectIdBase;
21 class V8ConsoleAgentImpl; 21 class V8ConsoleAgentImpl;
22 class V8DebuggerAgentImpl; 22 class V8DebuggerAgentImpl;
23 class V8InspectorImpl; 23 class V8InspectorImpl;
24 class V8HeapProfilerAgentImpl; 24 class V8HeapProfilerAgentImpl;
25 class V8ProfilerAgentImpl; 25 class V8ProfilerAgentImpl;
26 class V8RuntimeAgentImpl; 26 class V8RuntimeAgentImpl;
27 class V8SchemaAgentImpl; 27 class V8SchemaAgentImpl;
28 28
29 using protocol::ErrorString; 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, V8Inspector::Channel*,
36 const StringView& state); 36 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 46
47 InjectedScript* findInjectedScript(ErrorString*, int contextId); 47 Response findInjectedScript(int contextId, InjectedScript*&);
48 InjectedScript* findInjectedScript(ErrorString*, RemoteObjectIdBase*); 48 Response findInjectedScript(RemoteObjectIdBase*, InjectedScript*&);
49 void reset(); 49 void reset();
50 void discardInjectedScripts(); 50 void discardInjectedScripts();
51 void reportAllContexts(V8RuntimeAgentImpl*); 51 void reportAllContexts(V8RuntimeAgentImpl*);
52 void setCustomObjectFormatterEnabled(bool); 52 void setCustomObjectFormatterEnabled(bool);
53 std::unique_ptr<protocol::Runtime::RemoteObject> wrapObject( 53 std::unique_ptr<protocol::Runtime::RemoteObject> wrapObject(
54 v8::Local<v8::Context>, v8::Local<v8::Value>, const String16& groupName, 54 v8::Local<v8::Context>, v8::Local<v8::Value>, const String16& groupName,
55 bool generatePreview); 55 bool generatePreview);
56 std::unique_ptr<protocol::Runtime::RemoteObject> wrapTable( 56 std::unique_ptr<protocol::Runtime::RemoteObject> wrapTable(
57 v8::Local<v8::Context>, v8::Local<v8::Value> table, 57 v8::Local<v8::Context>, v8::Local<v8::Value> table,
58 v8::Local<v8::Value> columns); 58 v8::Local<v8::Value> columns);
59 std::vector<std::unique_ptr<protocol::Schema::Domain>> supportedDomainsImpl(); 59 std::vector<std::unique_ptr<protocol::Schema::Domain>> supportedDomainsImpl();
60 bool unwrapObject(ErrorString*, const String16& objectId, 60 Response unwrapObject(const String16& objectId, v8::Local<v8::Value>*,
61 v8::Local<v8::Value>*, v8::Local<v8::Context>*, 61 v8::Local<v8::Context>*, String16* objectGroup);
62 String16* objectGroup);
63 void releaseObjectGroup(const String16& objectGroup); 62 void releaseObjectGroup(const String16& objectGroup);
64 63
65 // V8InspectorSession implementation. 64 // V8InspectorSession implementation.
66 void dispatchProtocolMessage(const StringView& message) override; 65 void dispatchProtocolMessage(const StringView& message) override;
67 std::unique_ptr<StringBuffer> stateJSON() override; 66 std::unique_ptr<StringBuffer> stateJSON() override;
68 std::vector<std::unique_ptr<protocol::Schema::API::Domain>> supportedDomains() 67 std::vector<std::unique_ptr<protocol::Schema::API::Domain>> supportedDomains()
69 override; 68 override;
70 void addInspectedObject( 69 void addInspectedObject(
71 std::unique_ptr<V8InspectorSession::Inspectable>) override; 70 std::unique_ptr<V8InspectorSession::Inspectable>) override;
72 void schedulePauseOnNextStatement(const StringView& breakReason, 71 void schedulePauseOnNextStatement(const StringView& breakReason,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 std::unique_ptr<V8SchemaAgentImpl> m_schemaAgent; 116 std::unique_ptr<V8SchemaAgentImpl> m_schemaAgent;
118 std::vector<std::unique_ptr<V8InspectorSession::Inspectable>> 117 std::vector<std::unique_ptr<V8InspectorSession::Inspectable>>
119 m_inspectedObjects; 118 m_inspectedObjects;
120 119
121 DISALLOW_COPY_AND_ASSIGN(V8InspectorSessionImpl); 120 DISALLOW_COPY_AND_ASSIGN(V8InspectorSessionImpl);
122 }; 121 };
123 122
124 } // namespace v8_inspector 123 } // namespace v8_inspector
125 124
126 #endif // V8_INSPECTOR_V8INSPECTORSESSIONIMPL_H_ 125 #endif // V8_INSPECTOR_V8INSPECTORSESSIONIMPL_H_
OLDNEW
« no previous file with comments | « src/inspector/v8-heap-profiler-agent-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