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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp

Issue 2251343003: [DevTools] Generate separate copies of inspector_protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improvements 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
index 4d3f513dd5981389116e6325b260beb3ae054905..026ab2b1ca6ee4edd37fac15289c556d55285e72 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
@@ -352,9 +352,9 @@ void InspectorPageAgent::restore()
enable(&error);
setBlockedEventsWarningThreshold(&error, m_state->doubleProperty(PageAgentState::blockedEventsWarningThreshold, 0.0));
if (m_client) {
- String16 overlayMessage;
+ String overlayMessage;
m_state->getString(PageAgentState::overlayMessage, &overlayMessage);
- m_client->configureOverlay(m_state->booleanProperty(PageAgentState::overlaySuspended, false), overlayMessage.isEmpty() ? String() : String(overlayMessage));
+ m_client->configureOverlay(m_state->booleanProperty(PageAgentState::overlaySuspended, false), overlayMessage.isEmpty() ? String() : overlayMessage);
}
}
@@ -523,7 +523,11 @@ void InspectorPageAgent::searchContentAfterResourcesContentLoaded(const String&
return;
}
- callback->sendSuccess(m_v8Session->searchInTextByLines(toV8InspectorStringView(content), toV8InspectorStringView(query), caseSensitive, isRegex));
+ auto matches = m_v8Session->searchInTextByLines(toV8InspectorStringView(content), toV8InspectorStringView(query), caseSensitive, isRegex);
+ auto results = protocol::Array<v8_inspector::protocol::Debugger::API::SearchMatch>::create();
+ for (size_t i = 0; i < matches.size(); ++i)
+ results->addItem(std::move(matches[i]));
+ callback->sendSuccess(std::move(results));
}
void InspectorPageAgent::searchInResource(const String& frameId, const String& url, const String& query, const Maybe<bool>& optionalCaseSensitive, const Maybe<bool>& optionalIsRegex, std::unique_ptr<SearchInResourceCallback> callback)
@@ -560,7 +564,7 @@ void InspectorPageAgent::didClearDocumentOfWindowObject(LocalFrame* frame)
if (scripts) {
for (size_t i = 0; i < scripts->size(); ++i) {
auto script = scripts->at(i);
- String16 scriptText;
+ String scriptText;
if (script.second->asString(&scriptText))
frame->script().executeScriptInMainWorld(scriptText);
}

Powered by Google App Engine
This is Rietveld 408576698