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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp

Issue 2182423002: [DevTools] Remove V8ContentSearchUtil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@strings-1
Patch Set: query ensure16bit Created 4 years, 4 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
OLDNEW
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/inspector_protocol/Parser.h" 7 #include "platform/inspector_protocol/Parser.h"
8 #include "platform/v8_inspector/InjectedScript.h" 8 #include "platform/v8_inspector/InjectedScript.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/V8ConsoleAgentImpl.h" 11 #include "platform/v8_inspector/V8ConsoleAgentImpl.h"
12 #include "platform/v8_inspector/V8DebuggerAgentImpl.h" 12 #include "platform/v8_inspector/V8DebuggerAgentImpl.h"
13 #include "platform/v8_inspector/V8DebuggerImpl.h" 13 #include "platform/v8_inspector/V8DebuggerImpl.h"
14 #include "platform/v8_inspector/V8HeapProfilerAgentImpl.h" 14 #include "platform/v8_inspector/V8HeapProfilerAgentImpl.h"
15 #include "platform/v8_inspector/V8ProfilerAgentImpl.h" 15 #include "platform/v8_inspector/V8ProfilerAgentImpl.h"
16 #include "platform/v8_inspector/V8RuntimeAgentImpl.h" 16 #include "platform/v8_inspector/V8RuntimeAgentImpl.h"
17 #include "platform/v8_inspector/V8StringUtil.h"
17 #include "platform/v8_inspector/public/V8ContextInfo.h" 18 #include "platform/v8_inspector/public/V8ContextInfo.h"
18 #include "platform/v8_inspector/public/V8DebuggerClient.h" 19 #include "platform/v8_inspector/public/V8DebuggerClient.h"
19 20
20 namespace blink { 21 namespace blink {
21 22
22 const char V8InspectorSession::backtraceObjectGroup[] = "backtrace"; 23 const char V8InspectorSession::backtraceObjectGroup[] = "backtrace";
23 24
24 // static 25 // static
25 bool V8InspectorSession::canDispatchMethod(const String16& method) 26 bool V8InspectorSession::canDispatchMethod(const String16& method)
26 { 27 {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 230
230 std::unique_ptr<protocol::Runtime::RemoteObject> V8InspectorSessionImpl::wrapTab le(v8::Local<v8::Context> context, v8::Local<v8::Value> table, v8::Local<v8::Val ue> columns) 231 std::unique_ptr<protocol::Runtime::RemoteObject> V8InspectorSessionImpl::wrapTab le(v8::Local<v8::Context> context, v8::Local<v8::Value> table, v8::Local<v8::Val ue> columns)
231 { 232 {
232 ErrorString errorString; 233 ErrorString errorString;
233 InjectedScript* injectedScript = findInjectedScript(&errorString, V8Debugger Impl::contextId(context)); 234 InjectedScript* injectedScript = findInjectedScript(&errorString, V8Debugger Impl::contextId(context));
234 if (!injectedScript) 235 if (!injectedScript)
235 return nullptr; 236 return nullptr;
236 return injectedScript->wrapTable(table, columns); 237 return injectedScript->wrapTable(table, columns);
237 } 238 }
238 239
240 std::unique_ptr<protocol::Array<protocol::Debugger::API::SearchMatch>> V8Inspect orSessionImpl::searchInTextByLines(const uint16_t* text, size_t textLength, cons t uint16_t* query, size_t queryLength, const bool caseSensitive, const bool isRe gex)
241 {
242 std::vector<std::unique_ptr<protocol::Debugger::SearchMatch>> matches = sear chInTextByLinesImpl(this, String16(text, textLength), String16(query, queryLengt h), caseSensitive, isRegex);
243 std::unique_ptr<protocol::Array<protocol::Debugger::API::SearchMatch>> resul t = protocol::Array<protocol::Debugger::API::SearchMatch>::create();
244 for (size_t i = 0; i < matches.size(); ++i)
245 result->addItem(std::move(matches[i]));
246 return result;
247 }
248
239 void V8InspectorSessionImpl::setCustomObjectFormatterEnabled(bool enabled) 249 void V8InspectorSessionImpl::setCustomObjectFormatterEnabled(bool enabled)
240 { 250 {
241 m_customObjectFormatterEnabled = enabled; 251 m_customObjectFormatterEnabled = enabled;
242 const V8DebuggerImpl::ContextByIdMap* contexts = m_debugger->contextGroup(m_ contextGroupId); 252 const V8DebuggerImpl::ContextByIdMap* contexts = m_debugger->contextGroup(m_ contextGroupId);
243 if (!contexts) 253 if (!contexts)
244 return; 254 return;
245 for (auto& idContext : *contexts) { 255 for (auto& idContext : *contexts) {
246 InjectedScript* injectedScript = idContext.second->getInjectedScript(); 256 InjectedScript* injectedScript = idContext.second->getInjectedScript();
247 if (injectedScript) 257 if (injectedScript)
248 injectedScript->setCustomObjectFormatterEnabled(enabled); 258 injectedScript->setCustomObjectFormatterEnabled(enabled);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 m_debuggerAgent->resume(&errorString); 319 m_debuggerAgent->resume(&errorString);
310 } 320 }
311 321
312 void V8InspectorSessionImpl::stepOver() 322 void V8InspectorSessionImpl::stepOver()
313 { 323 {
314 ErrorString errorString; 324 ErrorString errorString;
315 m_debuggerAgent->stepOver(&errorString); 325 m_debuggerAgent->stepOver(&errorString);
316 } 326 }
317 327
318 } // namespace blink 328 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698