Index: Source/core/timing/PerformanceBase.h |
diff --git a/Source/core/timing/PerformanceBase.h b/Source/core/timing/PerformanceBase.h |
index 344ee39bd06f292308b24db49d8b58f9d2d4ff84..08a54f28f43f3d7b7ef555c2f212f5bf4f907b7a 100644 |
--- a/Source/core/timing/PerformanceBase.h |
+++ b/Source/core/timing/PerformanceBase.h |
@@ -44,11 +44,13 @@ namespace blink { |
class Document; |
class ExceptionState; |
+class PerformanceObserver; |
class PerformanceTiming; |
class ResourceTimingInfo; |
class UserTiming; |
using PerformanceEntryVector = HeapVector<Member<PerformanceEntry>>; |
+using PerformanceObservers = HeapListHashSet<Member<PerformanceObserver>>; |
class CORE_EXPORT PerformanceBase : public RefCountedGarbageCollectedEventTargetWithInlineData<PerformanceBase> { |
REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(PerformanceBase); |
@@ -88,9 +90,13 @@ public: |
void measure(const String& measureName, const String& startMark, const String& endMark, ExceptionState&); |
void clearMeasures(const String& measureName); |
+ void unregisterPerformanceObserver(PerformanceObserver*); |
esprehn
2015/07/24 08:23:12
These should all take references.
MikeB
2015/07/24 19:30:38
Done.
|
+ void registerPerformanceObserver(PerformanceObserver*); |
+ |
DECLARE_VIRTUAL_TRACE(); |
protected: |
+ |
explicit PerformanceBase(double timeOrigin); |
bool isResourceTimingBufferFull(); |
void addResourceTimingBuffer(PerformanceEntry*); |
@@ -98,6 +104,9 @@ protected: |
bool isFrameTimingBufferFull(); |
void addFrameTimingBuffer(PerformanceEntry*); |
+ void notifyObserversOfEntry(PerformanceEntry*); |
esprehn
2015/07/24 08:23:12
ditto
MikeB
2015/07/24 19:30:38
Done.
|
+ bool hasObserverFor(PerformanceEntry::EntryType); |
+ |
PerformanceEntryVector m_frameTimingBuffer; |
unsigned m_frameTimingBufferSize; |
PerformanceEntryVector m_resourceTimingBuffer; |
@@ -105,6 +114,9 @@ protected: |
double m_timeOrigin; |
Member<UserTiming> m_userTiming; |
+ |
+ PerformanceEntryType_t m_observerFilterOptions; |
esprehn
2015/07/24 08:23:12
Remove _t, we don't use that naming in blink.
MikeB
2015/07/24 19:30:38
Done.
|
+ PerformanceObservers m_observers; |
}; |
} // namespace blink |