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

Unified Diff: src/inspector/v8-inspector-impl.h

Issue 2905543004: [inspector] Prepare some methods in V8InspectorImpl to multiple sessions (Closed)
Patch Set: rebased Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/inspector/v8-debugger-agent-impl.cc ('k') | src/inspector/v8-inspector-impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-inspector-impl.h
diff --git a/src/inspector/v8-inspector-impl.h b/src/inspector/v8-inspector-impl.h
index d5a8c6e569928cb3e45d34e5dfb22599363d17da..697248dfeaad78df984573452dc3fef9e63fffa2 100644
--- a/src/inspector/v8-inspector-impl.h
+++ b/src/inspector/v8-inspector-impl.h
@@ -31,7 +31,7 @@
#ifndef V8_INSPECTOR_V8INSPECTORIMPL_H_
#define V8_INSPECTOR_V8INSPECTORIMPL_H_
-#include <vector>
+#include <functional>
#include "src/base/macros.h"
#include "src/inspector/protocol/Protocol.h"
@@ -102,17 +102,14 @@ class V8InspectorImpl : public V8Inspector {
void unmuteExceptions(int contextGroupId);
V8ConsoleMessageStorage* ensureConsoleMessageStorage(int contextGroupId);
bool hasConsoleMessageStorage(int contextGroupId);
- using ContextByIdMap =
- protocol::HashMap<int, std::unique_ptr<InspectedContext>>;
void discardInspectedContext(int contextGroupId, int contextId);
- const ContextByIdMap* contextGroup(int contextGroupId);
void disconnect(V8InspectorSessionImpl*);
V8InspectorSessionImpl* sessionForContextGroup(int contextGroupId);
+ V8InspectorSessionImpl* sessionById(int sessionId);
InspectedContext* getContext(int groupId, int contextId) const;
- V8DebuggerAgentImpl* enabledDebuggerAgentForGroup(int contextGroupId);
- V8RuntimeAgentImpl* enabledRuntimeAgentForGroup(int contextGroupId);
- V8ProfilerAgentImpl* enabledProfilerAgentForGroup(int contextGroupId);
V8Console* console();
+ void forEachContext(int contextGroupId,
+ std::function<void(InspectedContext*)> callback);
private:
v8::Isolate* m_isolate;
@@ -122,16 +119,20 @@ class V8InspectorImpl : public V8Inspector {
int m_capturingStackTracesCount;
unsigned m_lastExceptionId;
int m_lastContextId;
+ int m_lastSessionId = 0;
using MuteExceptionsMap = protocol::HashMap<int, int>;
MuteExceptionsMap m_muteExceptionsMap;
+ using ContextByIdMap =
+ protocol::HashMap<int, std::unique_ptr<InspectedContext>>;
using ContextsByGroupMap =
protocol::HashMap<int, std::unique_ptr<ContextByIdMap>>;
ContextsByGroupMap m_contexts;
using SessionMap = protocol::HashMap<int, V8InspectorSessionImpl*>;
SessionMap m_sessions;
+ protocol::HashMap<int, V8InspectorSessionImpl*> m_sessionById;
using ConsoleStorageMap =
protocol::HashMap<int, std::unique_ptr<V8ConsoleMessageStorage>>;
« no previous file with comments | « src/inspector/v8-debugger-agent-impl.cc ('k') | src/inspector/v8-inspector-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698