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

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

Issue 2189263004: [DevTools] Replace profiling{Started,Stopped} with explicit setOverlaySuspended call. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merged Created 4 years, 5 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 1b510c489ef42660e26d3e3b0701b67eb21743a3..106a07fa7e11f61a485b5c7e85a13a162ea8f2c4 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
@@ -80,6 +80,8 @@ static const char pageAgentScriptsToEvaluateOnLoad[] = "pageAgentScriptsToEvalua
static const char screencastEnabled[] = "screencastEnabled";
static const char autoAttachToCreatedPages[] = "autoAttachToCreatedPages";
static const char blockedEventsWarningThreshold[] = "blockedEventsWarningThreshold";
+static const char overlaySuspended[] = "overlaySuspended";
+static const char overlayMessage[] = "overlayMessage";
}
namespace {
@@ -349,6 +351,11 @@ void InspectorPageAgent::restore()
if (m_state->booleanProperty(PageAgentState::pageAgentEnabled, false))
enable(&error);
setBlockedEventsWarningThreshold(&error, m_state->doubleProperty(PageAgentState::blockedEventsWarningThreshold, 0.0));
+ if (m_client) {
+ String16 overlayMessage;
+ m_state->getString(PageAgentState::overlayMessage, &overlayMessage);
+ m_client->configureOverlay(m_state->booleanProperty(PageAgentState::overlaySuspended, false), overlayMessage.isEmpty() ? String() : String(overlayMessage));
+ }
}
void InspectorPageAgent::enable(ErrorString*)
@@ -369,6 +376,7 @@ void InspectorPageAgent::disable(ErrorString*)
m_inspectorResourceContentLoader->cancel(m_resourceContentLoaderClientId);
stopScreencast(0);
+ configureOverlay(nullptr, false, String());
finishReload();
}
@@ -739,10 +747,12 @@ void InspectorPageAgent::stopScreencast(ErrorString*)
m_state->setBoolean(PageAgentState::screencastEnabled, false);
}
-void InspectorPageAgent::setOverlayMessage(ErrorString*, const Maybe<String>& message)
+void InspectorPageAgent::configureOverlay(ErrorString*, const Maybe<bool>& suspended, const Maybe<String>& message)
{
+ m_state->setBoolean(PageAgentState::overlaySuspended, suspended.fromMaybe(false));
+ m_state->setString(PageAgentState::overlaySuspended, message.fromMaybe(String()));
if (m_client)
- m_client->setPausedInDebuggerMessage(message.fromMaybe(String()));
+ m_client->configureOverlay(suspended.fromMaybe(false), message.fromMaybe(String()));
}
void InspectorPageAgent::setBlockedEventsWarningThreshold(ErrorString*, double threshold)

Powered by Google App Engine
This is Rietveld 408576698