OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "platform/heap/Handle.h" | 40 #include "platform/heap/Handle.h" |
41 #include "wtf/Forward.h" | 41 #include "wtf/Forward.h" |
42 #include "wtf/HashSet.h" | 42 #include "wtf/HashSet.h" |
43 #include "wtf/ListHashSet.h" | 43 #include "wtf/ListHashSet.h" |
44 #include "wtf/Vector.h" | 44 #include "wtf/Vector.h" |
45 | 45 |
46 namespace blink { | 46 namespace blink { |
47 | 47 |
48 class DOMWindow; | 48 class DOMWindow; |
49 class ExceptionState; | 49 class ExceptionState; |
| 50 class LocalFrame; |
50 class PerformanceObserver; | 51 class PerformanceObserver; |
51 class PerformanceTiming; | 52 class PerformanceTiming; |
52 class ResourceTimingInfo; | 53 class ResourceTimingInfo; |
53 class UserTiming; | 54 class UserTiming; |
54 | 55 |
55 using PerformanceEntryVector = HeapVector<Member<PerformanceEntry>>; | 56 using PerformanceEntryVector = HeapVector<Member<PerformanceEntry>>; |
56 using PerformanceObservers = HeapListHashSet<Member<PerformanceObserver>>; | 57 using PerformanceObservers = HeapListHashSet<Member<PerformanceObserver>>; |
57 | 58 |
58 class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData { | 59 class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData { |
59 public: | 60 public: |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 93 |
93 void clearFrameTimings(); | 94 void clearFrameTimings(); |
94 void setFrameTimingBufferSize(unsigned); | 95 void setFrameTimingBufferSize(unsigned); |
95 | 96 |
96 DEFINE_ATTRIBUTE_EVENT_LISTENER(frametimingbufferfull); | 97 DEFINE_ATTRIBUTE_EVENT_LISTENER(frametimingbufferfull); |
97 | 98 |
98 void addLongTaskTiming(double, double, const String&, DOMWindow*); | 99 void addLongTaskTiming(double, double, const String&, DOMWindow*); |
99 | 100 |
100 void addResourceTiming(const ResourceTimingInfo&); | 101 void addResourceTiming(const ResourceTimingInfo&); |
101 | 102 |
| 103 void addNavigationTiming(LocalFrame*); |
| 104 |
102 void mark(const String& markName, ExceptionState&); | 105 void mark(const String& markName, ExceptionState&); |
103 void clearMarks(const String& markName); | 106 void clearMarks(const String& markName); |
104 | 107 |
105 void measure(const String& measureName, | 108 void measure(const String& measureName, |
106 const String& startMark, | 109 const String& startMark, |
107 const String& endMark, | 110 const String& endMark, |
108 ExceptionState&); | 111 ExceptionState&); |
109 void clearMeasures(const String& measureName); | 112 void clearMeasures(const String& measureName); |
110 | 113 |
111 void unregisterPerformanceObserver(PerformanceObserver&); | 114 void unregisterPerformanceObserver(PerformanceObserver&); |
(...skipping 15 matching lines...) Expand all Loading... |
127 | 130 |
128 void notifyObserversOfEntry(PerformanceEntry&); | 131 void notifyObserversOfEntry(PerformanceEntry&); |
129 bool hasObserverFor(PerformanceEntry::EntryType) const; | 132 bool hasObserverFor(PerformanceEntry::EntryType) const; |
130 | 133 |
131 void deliverObservationsTimerFired(TimerBase*); | 134 void deliverObservationsTimerFired(TimerBase*); |
132 | 135 |
133 PerformanceEntryVector m_frameTimingBuffer; | 136 PerformanceEntryVector m_frameTimingBuffer; |
134 unsigned m_frameTimingBufferSize; | 137 unsigned m_frameTimingBufferSize; |
135 PerformanceEntryVector m_resourceTimingBuffer; | 138 PerformanceEntryVector m_resourceTimingBuffer; |
136 unsigned m_resourceTimingBufferSize; | 139 unsigned m_resourceTimingBufferSize; |
| 140 Member<PerformanceEntry> m_navigationTiming; |
137 Member<UserTiming> m_userTiming; | 141 Member<UserTiming> m_userTiming; |
138 | 142 |
139 double m_timeOrigin; | 143 double m_timeOrigin; |
140 | 144 |
141 PerformanceEntryTypeMask m_observerFilterOptions; | 145 PerformanceEntryTypeMask m_observerFilterOptions; |
142 PerformanceObservers m_observers; | 146 PerformanceObservers m_observers; |
143 PerformanceObservers m_activeObservers; | 147 PerformanceObservers m_activeObservers; |
144 PerformanceObservers m_suspendedObservers; | 148 PerformanceObservers m_suspendedObservers; |
145 Timer<PerformanceBase> m_deliverObservationsTimer; | 149 Timer<PerformanceBase> m_deliverObservationsTimer; |
146 }; | 150 }; |
147 | 151 |
148 } // namespace blink | 152 } // namespace blink |
149 | 153 |
150 #endif // PerformanceBase_h | 154 #endif // PerformanceBase_h |
OLD | NEW |