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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 void AddLongTaskTiming(double start_time, | 105 void AddLongTaskTiming(double start_time, |
106 double end_time, | 106 double end_time, |
107 const String& name, | 107 const String& name, |
108 const String& culprit_frame_src, | 108 const String& culprit_frame_src, |
109 const String& culprit_frame_id, | 109 const String& culprit_frame_id, |
110 const String& culprit_frame_name); | 110 const String& culprit_frame_name); |
111 | 111 |
112 void AddResourceTiming(const ResourceTimingInfo&); | 112 void AddResourceTiming(const ResourceTimingInfo&); |
113 | 113 |
| 114 enum class ShouldAddToBuffer { |
| 115 Always, |
| 116 Never, |
| 117 }; |
| 118 void AddServerTiming(const ResourceResponse&, ShouldAddToBuffer); |
| 119 |
114 void NotifyNavigationTimingToObservers(); | 120 void NotifyNavigationTimingToObservers(); |
115 | 121 |
116 void AddFirstPaintTiming(double start_time); | 122 void AddFirstPaintTiming(double start_time); |
117 | 123 |
118 void AddFirstContentfulPaintTiming(double start_time); | 124 void AddFirstContentfulPaintTiming(double start_time); |
119 | 125 |
120 void mark(const String& mark_name, ExceptionState&); | 126 void mark(const String& mark_name, ExceptionState&); |
121 void clearMarks(const String& mark_name); | 127 void clearMarks(const String& mark_name); |
122 | 128 |
123 void measure(const String& measure_name, | 129 void measure(const String& measure_name, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 return nullptr; | 162 return nullptr; |
157 } | 163 } |
158 | 164 |
159 bool IsResourceTimingBufferFull(); | 165 bool IsResourceTimingBufferFull(); |
160 void AddResourceTimingBuffer(PerformanceEntry&); | 166 void AddResourceTimingBuffer(PerformanceEntry&); |
161 | 167 |
162 bool IsFrameTimingBufferFull(); | 168 bool IsFrameTimingBufferFull(); |
163 void AddFrameTimingBuffer(PerformanceEntry&); | 169 void AddFrameTimingBuffer(PerformanceEntry&); |
164 | 170 |
165 void NotifyObserversOfEntry(PerformanceEntry&); | 171 void NotifyObserversOfEntry(PerformanceEntry&); |
| 172 void NotifyObserversOfEntries(PerformanceEntryVector&); |
166 bool HasObserverFor(PerformanceEntry::EntryType) const; | 173 bool HasObserverFor(PerformanceEntry::EntryType) const; |
167 | 174 |
168 void DeliverObservationsTimerFired(TimerBase*); | 175 void DeliverObservationsTimerFired(TimerBase*); |
169 | 176 |
170 PerformanceEntryVector frame_timing_buffer_; | 177 PerformanceEntryVector frame_timing_buffer_; |
171 unsigned frame_timing_buffer_size_; | 178 unsigned frame_timing_buffer_size_; |
172 PerformanceEntryVector resource_timing_buffer_; | 179 PerformanceEntryVector resource_timing_buffer_; |
173 unsigned resource_timing_buffer_size_; | 180 unsigned resource_timing_buffer_size_; |
| 181 PerformanceEntryVector server_timing_buffer_; |
174 Member<PerformanceEntry> navigation_timing_; | 182 Member<PerformanceEntry> navigation_timing_; |
175 Member<UserTiming> user_timing_; | 183 Member<UserTiming> user_timing_; |
176 | 184 |
177 double time_origin_; | 185 double time_origin_; |
178 | 186 |
179 PerformanceEntryTypeMask observer_filter_options_; | 187 PerformanceEntryTypeMask observer_filter_options_; |
180 PerformanceObservers observers_; | 188 PerformanceObservers observers_; |
181 PerformanceObservers active_observers_; | 189 PerformanceObservers active_observers_; |
182 PerformanceObservers suspended_observers_; | 190 PerformanceObservers suspended_observers_; |
183 TaskRunnerTimer<PerformanceBase> deliver_observations_timer_; | 191 TaskRunnerTimer<PerformanceBase> deliver_observations_timer_; |
184 }; | 192 }; |
185 | 193 |
186 } // namespace blink | 194 } // namespace blink |
187 | 195 |
188 #endif // PerformanceBase_h | 196 #endif // PerformanceBase_h |
OLD | NEW |