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

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: win compile 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 5efe20ac9f2ba29ec73f3c29b48ef7efc25b9bf3..ed7d3805de914883d8696ce9770e3feb16303f4a 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
@@ -341,9 +341,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);
}
}
@@ -512,7 +512,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)
@@ -549,7 +553,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