Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: src/inspector/v8-inspector-session-impl.cc

Issue 2690663003: [inspector] exposed ExecutionContextId getter by context (Closed)
Patch Set: code style tunning Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/v8-inspector.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « include/v8-inspector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698