| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project 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 "src/inspector/v8-inspector-session-impl.h" | 5 #include "src/inspector/v8-inspector-session-impl.h" |
| 6 | 6 |
| 7 #include "src/inspector/injected-script.h" | 7 #include "src/inspector/injected-script.h" |
| 8 #include "src/inspector/inspected-context.h" | 8 #include "src/inspector/inspected-context.h" |
| 9 #include "src/inspector/protocol/Protocol.h" | 9 #include "src/inspector/protocol/Protocol.h" |
| 10 #include "src/inspector/remote-object-id.h" | 10 #include "src/inspector/remote-object-id.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 stringViewStartsWith(method, | 30 stringViewStartsWith(method, |
| 31 protocol::Profiler::Metainfo::commandPrefix) || | 31 protocol::Profiler::Metainfo::commandPrefix) || |
| 32 stringViewStartsWith( | 32 stringViewStartsWith( |
| 33 method, protocol::HeapProfiler::Metainfo::commandPrefix) || | 33 method, protocol::HeapProfiler::Metainfo::commandPrefix) || |
| 34 stringViewStartsWith(method, | 34 stringViewStartsWith(method, |
| 35 protocol::Console::Metainfo::commandPrefix) || | 35 protocol::Console::Metainfo::commandPrefix) || |
| 36 stringViewStartsWith(method, | 36 stringViewStartsWith(method, |
| 37 protocol::Schema::Metainfo::commandPrefix); | 37 protocol::Schema::Metainfo::commandPrefix); |
| 38 } | 38 } |
| 39 | 39 |
| 40 // static |
| 41 int V8ContextInfo::executionContextId(v8::Local<v8::Context> context) { |
| 42 return InspectedContext::contextId(context); |
| 43 } |
| 44 |
| 40 std::unique_ptr<V8InspectorSessionImpl> V8InspectorSessionImpl::create( | 45 std::unique_ptr<V8InspectorSessionImpl> V8InspectorSessionImpl::create( |
| 41 V8InspectorImpl* inspector, int contextGroupId, | 46 V8InspectorImpl* inspector, int contextGroupId, |
| 42 V8Inspector::Channel* channel, const StringView& state) { | 47 V8Inspector::Channel* channel, const StringView& state) { |
| 43 return std::unique_ptr<V8InspectorSessionImpl>( | 48 return std::unique_ptr<V8InspectorSessionImpl>( |
| 44 new V8InspectorSessionImpl(inspector, contextGroupId, channel, state)); | 49 new V8InspectorSessionImpl(inspector, contextGroupId, channel, state)); |
| 45 } | 50 } |
| 46 | 51 |
| 47 V8InspectorSessionImpl::V8InspectorSessionImpl(V8InspectorImpl* inspector, | 52 V8InspectorSessionImpl::V8InspectorSessionImpl(V8InspectorImpl* inspector, |
| 48 int contextGroupId, | 53 int contextGroupId, |
| 49 V8Inspector::Channel* channel, | 54 V8Inspector::Channel* channel, |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 std::vector<std::unique_ptr<protocol::Debugger::SearchMatch>> matches = | 432 std::vector<std::unique_ptr<protocol::Debugger::SearchMatch>> matches = |
| 428 searchInTextByLinesImpl(this, toString16(text), toString16(query), | 433 searchInTextByLinesImpl(this, toString16(text), toString16(query), |
| 429 caseSensitive, isRegex); | 434 caseSensitive, isRegex); |
| 430 std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>> result; | 435 std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>> result; |
| 431 for (size_t i = 0; i < matches.size(); ++i) | 436 for (size_t i = 0; i < matches.size(); ++i) |
| 432 result.push_back(std::move(matches[i])); | 437 result.push_back(std::move(matches[i])); |
| 433 return result; | 438 return result; |
| 434 } | 439 } |
| 435 | 440 |
| 436 } // namespace v8_inspector | 441 } // namespace v8_inspector |
| OLD | NEW |