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

Unified Diff: third_party/WebKit/Source/core/frame/PerformanceMonitor.h

Issue 2513483002: DevTools: introduce perf monitor actions w/ time budget for violations that are event handlers. (Closed)
Patch Set: expose locations instead of functions Created 4 years, 1 month 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/frame/PerformanceMonitor.h
diff --git a/third_party/WebKit/Source/core/frame/PerformanceMonitor.h b/third_party/WebKit/Source/core/frame/PerformanceMonitor.h
index da35d061459834a174fb7b235461e1315f120dc6..2e6093c8a77ff29462e83ca41ef41bd5cb8f2bd5 100644
--- a/third_party/WebKit/Source/core/frame/PerformanceMonitor.h
+++ b/third_party/WebKit/Source/core/frame/PerformanceMonitor.h
@@ -14,10 +14,12 @@ namespace blink {
class DOMWindow;
class Document;
+class EventListener;
class ExecutionContext;
class Frame;
class LocalFrame;
class Performance;
+class ScheduledAction;
class SourceLocation;
// Performance monitor for Web Performance APIs and logging.
@@ -36,9 +38,30 @@ class CORE_EXPORT PerformanceMonitor final
kLongLayout,
kBlockedEvent,
kBlockedParser,
+ kHandler,
+ kRecurringHandler,
kAfterLast
};
+ class CORE_EXPORT HandlerCall {
+ STACK_ALLOCATED();
+
+ public:
+ HandlerCall(ExecutionContext*, ScheduledAction*);
+ HandlerCall(ExecutionContext*, EventListener*);
+ ~HandlerCall();
+
+ private:
+ void start();
+
+ Member<ExecutionContext> m_context;
+ Member<PerformanceMonitor> m_performanceMonitor;
+ Member<ScheduledAction> m_scheduledAction;
+ Member<EventListener> m_eventListener;
+ Violation m_violation;
+ double m_startTime = 0;
+ };
+
class CORE_EXPORT Client : public GarbageCollectedMixin {
public:
virtual void reportLongTask(
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMTimer.cpp ('k') | third_party/WebKit/Source/core/frame/PerformanceMonitor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698