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

Unified Diff: third_party/WebKit/Source/core/timing/Performance.h

Issue 2484213003: Convert performance monitor to the subscription model. (Closed)
Patch Set: same 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/timing/Performance.h
diff --git a/third_party/WebKit/Source/core/timing/Performance.h b/third_party/WebKit/Source/core/timing/Performance.h
index ea5579d589e896fe18300674efdb97df2e7d666e..dcd071af02dad3502e0dd13991b6e261a1d745c2 100644
--- a/third_party/WebKit/Source/core/timing/Performance.h
+++ b/third_party/WebKit/Source/core/timing/Performance.h
@@ -34,6 +34,7 @@
#include "core/CoreExport.h"
#include "core/frame/DOMWindowProperty.h"
+#include "core/frame/PerformanceMonitor.h"
#include "core/timing/MemoryInfo.h"
#include "core/timing/PerformanceBase.h"
#include "core/timing/PerformanceNavigation.h"
@@ -45,7 +46,8 @@ class ScriptState;
class ScriptValue;
class CORE_EXPORT Performance final : public PerformanceBase,
- public DOMWindowProperty {
+ public DOMWindowProperty,
+ public PerformanceMonitor::Client {
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(Performance);
friend class PerformanceTest;
@@ -71,8 +73,14 @@ class CORE_EXPORT Performance final : public PerformanceBase,
private:
explicit Performance(LocalFrame*);
- // DOMWindowProperty overrides.
- void frameDestroyed() override;
+ static std::pair<String, DOMWindow*> sanitizedAttribution(
+ const HeapHashSet<Member<Frame>>& frames,
+ Frame* observerFrame);
+
+ // PerformanceMonitor::Client implementation.
+ void reportLongTask(double startTime,
+ double endTime,
+ const HeapHashSet<Member<Frame>>& contextFrames) override;
mutable Member<PerformanceNavigation> m_navigation;
mutable Member<PerformanceTiming> m_timing;

Powered by Google App Engine
This is Rietveld 408576698