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/InspectedContext.h" | 8 #include "platform/v8_inspector/InspectedContext.h" |
9 #include "platform/v8_inspector/RemoteObjectId.h" | 9 #include "platform/v8_inspector/RemoteObjectId.h" |
10 #include "platform/v8_inspector/V8ConsoleAgentImpl.h" | 10 #include "platform/v8_inspector/V8ConsoleAgentImpl.h" |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 | 271 |
272 V8InspectorSession::Inspectable* V8InspectorSessionImpl::inspectedObject(unsigne
d num) | 272 V8InspectorSession::Inspectable* V8InspectorSessionImpl::inspectedObject(unsigne
d num) |
273 { | 273 { |
274 if (num >= m_inspectedObjects.size()) | 274 if (num >= m_inspectedObjects.size()) |
275 return nullptr; | 275 return nullptr; |
276 return m_inspectedObjects[num].get(); | 276 return m_inspectedObjects[num].get(); |
277 } | 277 } |
278 | 278 |
279 void V8InspectorSessionImpl::schedulePauseOnNextStatement(const String16& breakR
eason, const String16& breakDetails) | 279 void V8InspectorSessionImpl::schedulePauseOnNextStatement(const String16& breakR
eason, const String16& breakDetails) |
280 { | 280 { |
281 m_debuggerAgent->schedulePauseOnNextStatement(breakReason, protocol::Diction
aryValue::cast(parseJSON(breakDetails))); | 281 m_debuggerAgent->schedulePauseOnNextStatement(breakReason, protocol::Diction
aryValue::cast(protocol::parseJSON(breakDetails))); |
282 } | 282 } |
283 | 283 |
284 void V8InspectorSessionImpl::cancelPauseOnNextStatement() | 284 void V8InspectorSessionImpl::cancelPauseOnNextStatement() |
285 { | 285 { |
286 m_debuggerAgent->cancelPauseOnNextStatement(); | 286 m_debuggerAgent->cancelPauseOnNextStatement(); |
287 } | 287 } |
288 | 288 |
289 void V8InspectorSessionImpl::breakProgram(const String16& breakReason, const Str
ing16& breakDetails) | 289 void V8InspectorSessionImpl::breakProgram(const String16& breakReason, const Str
ing16& breakDetails) |
290 { | 290 { |
291 m_debuggerAgent->breakProgram(breakReason, protocol::DictionaryValue::cast(p
arseJSON(breakDetails))); | 291 m_debuggerAgent->breakProgram(breakReason, protocol::DictionaryValue::cast(p
rotocol::parseJSON(breakDetails))); |
292 } | 292 } |
293 | 293 |
294 void V8InspectorSessionImpl::setSkipAllPauses(bool skip) | 294 void V8InspectorSessionImpl::setSkipAllPauses(bool skip) |
295 { | 295 { |
296 ErrorString errorString; | 296 ErrorString errorString; |
297 m_debuggerAgent->setSkipAllPauses(&errorString, skip); | 297 m_debuggerAgent->setSkipAllPauses(&errorString, skip); |
298 } | 298 } |
299 | 299 |
300 void V8InspectorSessionImpl::resume() | 300 void V8InspectorSessionImpl::resume() |
301 { | 301 { |
302 ErrorString errorString; | 302 ErrorString errorString; |
303 m_debuggerAgent->resume(&errorString); | 303 m_debuggerAgent->resume(&errorString); |
304 } | 304 } |
305 | 305 |
306 void V8InspectorSessionImpl::stepOver() | 306 void V8InspectorSessionImpl::stepOver() |
307 { | 307 { |
308 ErrorString errorString; | 308 ErrorString errorString; |
309 m_debuggerAgent->stepOver(&errorString); | 309 m_debuggerAgent->stepOver(&errorString); |
310 } | 310 } |
311 | 311 |
312 std::unique_ptr<protocol::Array<protocol::Debugger::API::SearchMatch>> V8Inspect
orSessionImpl::searchInTextByLines(const String16& text, const String16& query,
bool caseSensitive, bool isRegex) | 312 std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>> V8InspectorSe
ssionImpl::searchInTextByLines(const String16& text, const String16& query, bool
caseSensitive, bool isRegex) |
313 { | 313 { |
314 std::vector<std::unique_ptr<protocol::Debugger::SearchMatch>> matches = sear
chInTextByLinesImpl(this, text, query, caseSensitive, isRegex); | 314 std::vector<std::unique_ptr<protocol::Debugger::SearchMatch>> matches = sear
chInTextByLinesImpl(this, text, query, caseSensitive, isRegex); |
315 std::unique_ptr<protocol::Array<protocol::Debugger::API::SearchMatch>> resul
t = protocol::Array<protocol::Debugger::API::SearchMatch>::create(); | 315 std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>> result; |
316 for (size_t i = 0; i < matches.size(); ++i) | 316 for (size_t i = 0; i < matches.size(); ++i) |
317 result->addItem(std::move(matches[i])); | 317 result.push_back(std::move(matches[i])); |
318 return result; | 318 return result; |
319 } | 319 } |
320 | 320 |
321 } // namespace v8_inspector | 321 } // namespace v8_inspector |
OLD | NEW |