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; |
44 class V8ConsoleMessageStorage; | 45 class V8ConsoleMessageStorage; |
45 class V8Debugger; | 46 class V8Debugger; |
46 class V8DebuggerAgentImpl; | 47 class V8DebuggerAgentImpl; |
47 class V8InspectorSessionImpl; | 48 class V8InspectorSessionImpl; |
48 class V8ProfilerAgentImpl; | 49 class V8ProfilerAgentImpl; |
49 class V8RuntimeAgentImpl; | 50 class V8RuntimeAgentImpl; |
50 class V8StackTraceImpl; | 51 class V8StackTraceImpl; |
51 | 52 |
52 class V8InspectorImpl : public V8Inspector { | 53 class V8InspectorImpl : public V8Inspector { |
53 public: | 54 public: |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 using ContextByIdMap = | 105 using ContextByIdMap = |
105 protocol::HashMap<int, std::unique_ptr<InspectedContext>>; | 106 protocol::HashMap<int, std::unique_ptr<InspectedContext>>; |
106 void discardInspectedContext(int contextGroupId, int contextId); | 107 void discardInspectedContext(int contextGroupId, int contextId); |
107 const ContextByIdMap* contextGroup(int contextGroupId); | 108 const ContextByIdMap* contextGroup(int contextGroupId); |
108 void disconnect(V8InspectorSessionImpl*); | 109 void disconnect(V8InspectorSessionImpl*); |
109 V8InspectorSessionImpl* sessionForContextGroup(int contextGroupId); | 110 V8InspectorSessionImpl* sessionForContextGroup(int contextGroupId); |
110 InspectedContext* getContext(int groupId, int contextId) const; | 111 InspectedContext* getContext(int groupId, int contextId) const; |
111 V8DebuggerAgentImpl* enabledDebuggerAgentForGroup(int contextGroupId); | 112 V8DebuggerAgentImpl* enabledDebuggerAgentForGroup(int contextGroupId); |
112 V8RuntimeAgentImpl* enabledRuntimeAgentForGroup(int contextGroupId); | 113 V8RuntimeAgentImpl* enabledRuntimeAgentForGroup(int contextGroupId); |
113 V8ProfilerAgentImpl* enabledProfilerAgentForGroup(int contextGroupId); | 114 V8ProfilerAgentImpl* enabledProfilerAgentForGroup(int contextGroupId); |
| 115 V8Console* console(); |
114 | 116 |
115 private: | 117 private: |
116 v8::Isolate* m_isolate; | 118 v8::Isolate* m_isolate; |
117 V8InspectorClient* m_client; | 119 V8InspectorClient* m_client; |
118 std::unique_ptr<V8Debugger> m_debugger; | 120 std::unique_ptr<V8Debugger> m_debugger; |
119 v8::Global<v8::Context> m_regexContext; | 121 v8::Global<v8::Context> m_regexContext; |
120 int m_capturingStackTracesCount; | 122 int m_capturingStackTracesCount; |
121 unsigned m_lastExceptionId; | 123 unsigned m_lastExceptionId; |
122 int m_lastContextId; | 124 int m_lastContextId; |
123 | 125 |
124 using MuteExceptionsMap = protocol::HashMap<int, int>; | 126 using MuteExceptionsMap = protocol::HashMap<int, int>; |
125 MuteExceptionsMap m_muteExceptionsMap; | 127 MuteExceptionsMap m_muteExceptionsMap; |
126 | 128 |
127 using ContextsByGroupMap = | 129 using ContextsByGroupMap = |
128 protocol::HashMap<int, std::unique_ptr<ContextByIdMap>>; | 130 protocol::HashMap<int, std::unique_ptr<ContextByIdMap>>; |
129 ContextsByGroupMap m_contexts; | 131 ContextsByGroupMap m_contexts; |
130 | 132 |
131 using SessionMap = protocol::HashMap<int, V8InspectorSessionImpl*>; | 133 using SessionMap = protocol::HashMap<int, V8InspectorSessionImpl*>; |
132 SessionMap m_sessions; | 134 SessionMap m_sessions; |
133 | 135 |
134 using ConsoleStorageMap = | 136 using ConsoleStorageMap = |
135 protocol::HashMap<int, std::unique_ptr<V8ConsoleMessageStorage>>; | 137 protocol::HashMap<int, std::unique_ptr<V8ConsoleMessageStorage>>; |
136 ConsoleStorageMap m_consoleStorageMap; | 138 ConsoleStorageMap m_consoleStorageMap; |
137 | 139 |
138 protocol::HashMap<int, int> m_contextIdToGroupIdMap; | 140 protocol::HashMap<int, int> m_contextIdToGroupIdMap; |
139 | 141 |
| 142 std::unique_ptr<V8Console> m_console; |
| 143 |
140 DISALLOW_COPY_AND_ASSIGN(V8InspectorImpl); | 144 DISALLOW_COPY_AND_ASSIGN(V8InspectorImpl); |
141 }; | 145 }; |
142 | 146 |
143 } // namespace v8_inspector | 147 } // namespace v8_inspector |
144 | 148 |
145 #endif // V8_INSPECTOR_V8INSPECTORIMPL_H_ | 149 #endif // V8_INSPECTOR_V8INSPECTORIMPL_H_ |
OLD | NEW |