OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include <vector> | 34 #include <vector> |
35 | 35 |
36 #include "src/base/macros.h" | 36 #include "src/base/macros.h" |
37 #include "src/inspector/protocol/Protocol.h" | 37 #include "src/inspector/protocol/Protocol.h" |
38 | 38 |
39 #include "include/v8-inspector.h" | 39 #include "include/v8-inspector.h" |
40 | 40 |
41 namespace v8_inspector { | 41 namespace v8_inspector { |
42 | 42 |
43 class InspectedContext; | 43 class InspectedContext; |
44 class V8Console; | |
45 class V8ConsoleMessageStorage; | 44 class V8ConsoleMessageStorage; |
46 class V8Debugger; | 45 class V8Debugger; |
47 class V8DebuggerAgentImpl; | 46 class V8DebuggerAgentImpl; |
48 class V8InspectorSessionImpl; | 47 class V8InspectorSessionImpl; |
49 class V8ProfilerAgentImpl; | 48 class V8ProfilerAgentImpl; |
50 class V8RuntimeAgentImpl; | 49 class V8RuntimeAgentImpl; |
51 class V8StackTraceImpl; | 50 class V8StackTraceImpl; |
52 | 51 |
53 class V8InspectorImpl : public V8Inspector { | 52 class V8InspectorImpl : public V8Inspector { |
54 public: | 53 public: |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 using ContextByIdMap = | 104 using ContextByIdMap = |
106 protocol::HashMap<int, std::unique_ptr<InspectedContext>>; | 105 protocol::HashMap<int, std::unique_ptr<InspectedContext>>; |
107 void discardInspectedContext(int contextGroupId, int contextId); | 106 void discardInspectedContext(int contextGroupId, int contextId); |
108 const ContextByIdMap* contextGroup(int contextGroupId); | 107 const ContextByIdMap* contextGroup(int contextGroupId); |
109 void disconnect(V8InspectorSessionImpl*); | 108 void disconnect(V8InspectorSessionImpl*); |
110 V8InspectorSessionImpl* sessionForContextGroup(int contextGroupId); | 109 V8InspectorSessionImpl* sessionForContextGroup(int contextGroupId); |
111 InspectedContext* getContext(int groupId, int contextId) const; | 110 InspectedContext* getContext(int groupId, int contextId) const; |
112 V8DebuggerAgentImpl* enabledDebuggerAgentForGroup(int contextGroupId); | 111 V8DebuggerAgentImpl* enabledDebuggerAgentForGroup(int contextGroupId); |
113 V8RuntimeAgentImpl* enabledRuntimeAgentForGroup(int contextGroupId); | 112 V8RuntimeAgentImpl* enabledRuntimeAgentForGroup(int contextGroupId); |
114 V8ProfilerAgentImpl* enabledProfilerAgentForGroup(int contextGroupId); | 113 V8ProfilerAgentImpl* enabledProfilerAgentForGroup(int contextGroupId); |
115 V8Console* console(); | |
116 | 114 |
117 private: | 115 private: |
118 v8::Isolate* m_isolate; | 116 v8::Isolate* m_isolate; |
119 V8InspectorClient* m_client; | 117 V8InspectorClient* m_client; |
120 std::unique_ptr<V8Debugger> m_debugger; | 118 std::unique_ptr<V8Debugger> m_debugger; |
121 v8::Global<v8::Context> m_regexContext; | 119 v8::Global<v8::Context> m_regexContext; |
122 int m_capturingStackTracesCount; | 120 int m_capturingStackTracesCount; |
123 unsigned m_lastExceptionId; | 121 unsigned m_lastExceptionId; |
124 int m_lastContextId; | 122 int m_lastContextId; |
125 | 123 |
126 using MuteExceptionsMap = protocol::HashMap<int, int>; | 124 using MuteExceptionsMap = protocol::HashMap<int, int>; |
127 MuteExceptionsMap m_muteExceptionsMap; | 125 MuteExceptionsMap m_muteExceptionsMap; |
128 | 126 |
129 using ContextsByGroupMap = | 127 using ContextsByGroupMap = |
130 protocol::HashMap<int, std::unique_ptr<ContextByIdMap>>; | 128 protocol::HashMap<int, std::unique_ptr<ContextByIdMap>>; |
131 ContextsByGroupMap m_contexts; | 129 ContextsByGroupMap m_contexts; |
132 | 130 |
133 using SessionMap = protocol::HashMap<int, V8InspectorSessionImpl*>; | 131 using SessionMap = protocol::HashMap<int, V8InspectorSessionImpl*>; |
134 SessionMap m_sessions; | 132 SessionMap m_sessions; |
135 | 133 |
136 using ConsoleStorageMap = | 134 using ConsoleStorageMap = |
137 protocol::HashMap<int, std::unique_ptr<V8ConsoleMessageStorage>>; | 135 protocol::HashMap<int, std::unique_ptr<V8ConsoleMessageStorage>>; |
138 ConsoleStorageMap m_consoleStorageMap; | 136 ConsoleStorageMap m_consoleStorageMap; |
139 | 137 |
140 protocol::HashMap<int, int> m_contextIdToGroupIdMap; | 138 protocol::HashMap<int, int> m_contextIdToGroupIdMap; |
141 | 139 |
142 std::unique_ptr<V8Console> m_console; | |
143 | |
144 DISALLOW_COPY_AND_ASSIGN(V8InspectorImpl); | 140 DISALLOW_COPY_AND_ASSIGN(V8InspectorImpl); |
145 }; | 141 }; |
146 | 142 |
147 } // namespace v8_inspector | 143 } // namespace v8_inspector |
148 | 144 |
149 #endif // V8_INSPECTOR_V8INSPECTORIMPL_H_ | 145 #endif // V8_INSPECTOR_V8INSPECTORIMPL_H_ |
OLD | NEW |