OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium 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 #include "platform/v8_inspector/V8InspectorSessionImpl.h" | 5 #include "platform/v8_inspector/V8InspectorSessionImpl.h" |
6 | 6 |
7 #include "platform/v8_inspector/InjectedScript.h" | 7 #include "platform/v8_inspector/InjectedScript.h" |
8 #include "platform/v8_inspector/InjectedScriptHost.h" | 8 #include "platform/v8_inspector/InjectedScriptHost.h" |
9 #include "platform/v8_inspector/InspectedContext.h" | 9 #include "platform/v8_inspector/InspectedContext.h" |
10 #include "platform/v8_inspector/RemoteObjectId.h" | 10 #include "platform/v8_inspector/RemoteObjectId.h" |
11 #include "platform/v8_inspector/V8DebuggerAgentImpl.h" | 11 #include "platform/v8_inspector/V8DebuggerAgentImpl.h" |
12 #include "platform/v8_inspector/V8DebuggerImpl.h" | 12 #include "platform/v8_inspector/V8DebuggerImpl.h" |
13 #include "platform/v8_inspector/V8HeapProfilerAgentImpl.h" | 13 #include "platform/v8_inspector/V8HeapProfilerAgentImpl.h" |
14 #include "platform/v8_inspector/V8ProfilerAgentImpl.h" | 14 #include "platform/v8_inspector/V8ProfilerAgentImpl.h" |
15 #include "platform/v8_inspector/V8RuntimeAgentImpl.h" | 15 #include "platform/v8_inspector/V8RuntimeAgentImpl.h" |
16 #include "platform/v8_inspector/public/V8ContextInfo.h" | 16 #include "platform/v8_inspector/public/V8ContextInfo.h" |
17 #include "platform/v8_inspector/public/V8DebuggerClient.h" | 17 #include "platform/v8_inspector/public/V8DebuggerClient.h" |
18 | 18 |
19 namespace blink { | 19 namespace blink { |
20 | 20 |
| 21 const char V8InspectorSession::backtraceObjectGroup[] = "backtrace"; |
| 22 |
21 PassOwnPtr<V8InspectorSessionImpl> V8InspectorSessionImpl::create(V8DebuggerImpl
* debugger, int contextGroupId) | 23 PassOwnPtr<V8InspectorSessionImpl> V8InspectorSessionImpl::create(V8DebuggerImpl
* debugger, int contextGroupId) |
22 { | 24 { |
23 return adoptPtr(new V8InspectorSessionImpl(debugger, contextGroupId)); | 25 return adoptPtr(new V8InspectorSessionImpl(debugger, contextGroupId)); |
24 } | 26 } |
25 | 27 |
26 V8InspectorSessionImpl::V8InspectorSessionImpl(V8DebuggerImpl* debugger, int con
textGroupId) | 28 V8InspectorSessionImpl::V8InspectorSessionImpl(V8DebuggerImpl* debugger, int con
textGroupId) |
27 : m_contextGroupId(contextGroupId) | 29 : m_contextGroupId(contextGroupId) |
28 , m_debugger(debugger) | 30 , m_debugger(debugger) |
29 , m_client(nullptr) | 31 , m_client(nullptr) |
30 , m_injectedScriptHost(InjectedScriptHost::create(debugger)) | 32 , m_injectedScriptHost(InjectedScriptHost::create(debugger)) |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 m_inspectedObjects.removeLast(); | 183 m_inspectedObjects.removeLast(); |
182 } | 184 } |
183 | 185 |
184 V8RuntimeAgent::Inspectable* V8InspectorSessionImpl::inspectedObject(unsigned nu
m) | 186 V8RuntimeAgent::Inspectable* V8InspectorSessionImpl::inspectedObject(unsigned nu
m) |
185 { | 187 { |
186 if (num >= m_inspectedObjects.size()) | 188 if (num >= m_inspectedObjects.size()) |
187 return nullptr; | 189 return nullptr; |
188 return m_inspectedObjects[num].get(); | 190 return m_inspectedObjects[num].get(); |
189 } | 191 } |
190 | 192 |
| 193 void V8InspectorSessionImpl::schedulePauseOnNextStatement(const String16& breakR
eason, PassOwnPtr<protocol::DictionaryValue> data) |
| 194 { |
| 195 m_debuggerAgent->schedulePauseOnNextStatement(breakReason, data); |
| 196 } |
| 197 |
| 198 void V8InspectorSessionImpl::cancelPauseOnNextStatement() |
| 199 { |
| 200 m_debuggerAgent->cancelPauseOnNextStatement(); |
| 201 } |
| 202 |
| 203 void V8InspectorSessionImpl::breakProgram(const String16& breakReason, PassOwnPt
r<protocol::DictionaryValue> data) |
| 204 { |
| 205 m_debuggerAgent->breakProgram(breakReason, data); |
| 206 } |
| 207 |
| 208 void V8InspectorSessionImpl::breakProgramOnException(const String16& breakReason
, PassOwnPtr<protocol::DictionaryValue> data) |
| 209 { |
| 210 m_debuggerAgent->breakProgramOnException(breakReason, data); |
| 211 } |
| 212 |
| 213 void V8InspectorSessionImpl::setSkipAllPauses(bool skip) |
| 214 { |
| 215 ErrorString errorString; |
| 216 m_debuggerAgent->setSkipAllPauses(&errorString, skip); |
| 217 } |
| 218 |
| 219 void V8InspectorSessionImpl::asyncTaskScheduled(const String16& taskName, void*
task, bool recurring) |
| 220 { |
| 221 m_debuggerAgent->asyncTaskScheduled(taskName, task, recurring); |
| 222 } |
| 223 |
| 224 void V8InspectorSessionImpl::asyncTaskCanceled(void* task) |
| 225 { |
| 226 m_debuggerAgent->asyncTaskCanceled(task); |
| 227 } |
| 228 |
| 229 void V8InspectorSessionImpl::asyncTaskStarted(void* task) |
| 230 { |
| 231 m_debuggerAgent->asyncTaskStarted(task); |
| 232 } |
| 233 |
| 234 void V8InspectorSessionImpl::asyncTaskFinished(void* task) |
| 235 { |
| 236 m_debuggerAgent->asyncTaskFinished(task); |
| 237 } |
| 238 |
| 239 void V8InspectorSessionImpl::allAsyncTasksCanceled() |
| 240 { |
| 241 m_debuggerAgent->allAsyncTasksCanceled(); |
| 242 } |
| 243 |
191 } // namespace blink | 244 } // namespace blink |
OLD | NEW |