| 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 a06b1a98f70ebb35fc1471817134d44117287920..cb2a9de69b10ec297e673e02b7b201f71ee825f3 100644
|
| --- a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
|
| @@ -81,6 +81,8 @@
|
| "pageAgentScriptsToEvaluateOnLoad";
|
| 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";
|
| }
|
| @@ -369,6 +371,8 @@
|
| void InspectorPageAgent::restore() {
|
| if (m_state->booleanProperty(PageAgentState::pageAgentEnabled, false))
|
| enable();
|
| + setBlockedEventsWarningThreshold(m_state->doubleProperty(
|
| + PageAgentState::blockedEventsWarningThreshold, 0.0));
|
| if (m_client) {
|
| String overlayMessage;
|
| m_state->getString(PageAgentState::overlayMessage, &overlayMessage);
|
| @@ -841,6 +845,16 @@
|
| return Response::OK();
|
| }
|
|
|
| +Response InspectorPageAgent::setBlockedEventsWarningThreshold(
|
| + double threshold) {
|
| + m_state->setDouble(PageAgentState::blockedEventsWarningThreshold, threshold);
|
| + FrameHost* host = m_inspectedFrames->root()->host();
|
| + if (!host)
|
| + return Response::Error("Host not found");
|
| + host->settings().setBlockedMainThreadEventsWarningThreshold(threshold);
|
| + return Response::OK();
|
| +}
|
| +
|
| Response InspectorPageAgent::getLayoutMetrics(
|
| std::unique_ptr<protocol::Page::LayoutViewport>* outLayoutViewport,
|
| std::unique_ptr<protocol::Page::VisualViewport>* outVisualViewport) {
|
|
|