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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorInputAgent.h

Issue 1949793002: Emit a console warning when blocking event listener is delayed for too long (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 7 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/InspectorInputAgent.h
diff --git a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.h b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.h
index a14c89f57de804d03283864f4bfb46a22487c808..6bc6063e23975c8fbaf95b8296fe40cf11817c1d 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.h
@@ -38,9 +38,12 @@
#include "wtf/text/WTFString.h"
namespace blink {
+class ExecutionContext;
+class Event;
class InspectedFrames;
class PlatformKeyboardEvent;
class PlatformMouseEvent;
+class RegisteredEventListener;
class CORE_EXPORT InspectorInputAgent final : public InspectorBaseAgent<InspectorInputAgent, protocol::Frontend::Input>, public protocol::Backend::Input {
WTF_MAKE_NONCOPYABLE(InspectorInputAgent);
@@ -53,15 +56,29 @@ public:
~InspectorInputAgent() override;
DECLARE_VIRTUAL_TRACE();
- // Methods called from the frontend for simulating input.
+ // InspectorBaseAgent overrides
+ void restore() override;
+ void disable(ErrorString*) override;
+
+ // Protocol implementation.
void dispatchTouchEvent(ErrorString*, const String& type, PassOwnPtr<protocol::Array<protocol::Input::TouchPoint>> touchPoints, const Maybe<int>& modifiers, const Maybe<double>& timestamp) override;
+ void setBlockedEventsWarningThreshold(ErrorString*, double threshold) override;
+
+ // InspectorInstrumentation method(s).
+ void reportBlockedEvent(ExecutionContext*, const Event*, RegisteredEventListener*, double delayedSeconds);
+
+ // InpsectorOverrides method(s).
+ bool shouldReportBlockedEvent(const Event*);
+
private:
explicit InspectorInputAgent(InspectedFrames*);
+ void setEnabled(bool);
+
Member<InspectedFrames> m_inspectedFrames;
+ double m_blockedEventsWarningThreshold;
};
-
} // namespace blink
#endif // !defined(InspectorInputAgent_h)

Powered by Google App Engine
This is Rietveld 408576698