| Index: third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
|
| diff --git a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
|
| index 1fe3e8cb546a0153fa4808ee6db2fcf228984562..1ee5812883ccf3ef43069a9606b48fa0d6f53c38 100644
|
| --- a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
|
| @@ -30,8 +30,11 @@
|
|
|
| #include "core/inspector/InspectorInputAgent.h"
|
|
|
| +#include "core/dom/ExecutionContext.h"
|
| +#include "core/frame/FrameHost.h"
|
| #include "core/frame/FrameView.h"
|
| #include "core/frame/LocalFrame.h"
|
| +#include "core/frame/Settings.h"
|
| #include "core/input/EventHandler.h"
|
| #include "core/inspector/InspectedFrames.h"
|
| #include "core/page/ChromeClient.h"
|
| @@ -124,6 +127,10 @@ void ConvertInspectorPoint(blink::LocalFrame* frame, const blink::IntPoint& poin
|
|
|
| namespace blink {
|
|
|
| +namespace InputAgentState {
|
| +static const char blockedEventsWarningThreshold[] = "blockedEventsWarningThreshold";
|
| +}
|
| +
|
| InspectorInputAgent::InspectorInputAgent(InspectedFrames* inspectedFrames)
|
| : InspectorBaseAgent<InspectorInputAgent, protocol::Frontend::Input>("Input")
|
| , m_inspectedFrames(inspectedFrames)
|
| @@ -203,6 +210,22 @@ void InspectorInputAgent::dispatchTouchEvent(ErrorString* error, const String& t
|
| m_inspectedFrames->root()->eventHandler().handleTouchEvent(event);
|
| }
|
|
|
| +void InspectorInputAgent::restore()
|
| +{
|
| + ErrorString dummy;
|
| +
|
| + setBlockedEventsWarningThreshold(&dummy, m_state->numberProperty(InputAgentState::blockedEventsWarningThreshold, 0.0));
|
| +}
|
| +
|
| +void InspectorInputAgent::setBlockedEventsWarningThreshold(ErrorString*, double threshold)
|
| +{
|
| + m_state->setNumber(InputAgentState::blockedEventsWarningThreshold, threshold);
|
| + FrameHost* host = m_inspectedFrames->root()->host();
|
| + if (!host)
|
| + return;
|
| + host->settings().setBlockedMainThreadEventsWarningThreshold(threshold);
|
| +}
|
| +
|
| DEFINE_TRACE(InspectorInputAgent)
|
| {
|
| visitor->trace(m_inspectedFrames);
|
|
|