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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 PerformanceEntryVector getEntries(); | 91 PerformanceEntryVector getEntries(); |
92 PerformanceEntryVector getEntriesByType(const String& entry_type); | 92 PerformanceEntryVector getEntriesByType(const String& entry_type); |
93 PerformanceEntryVector getEntriesByName(const String& name, | 93 PerformanceEntryVector getEntriesByName(const String& name, |
94 const String& entry_type); | 94 const String& entry_type); |
95 | 95 |
96 void clearResourceTimings(); | 96 void clearResourceTimings(); |
97 void setResourceTimingBufferSize(unsigned); | 97 void setResourceTimingBufferSize(unsigned); |
98 | 98 |
99 DEFINE_ATTRIBUTE_EVENT_LISTENER(resourcetimingbufferfull); | 99 DEFINE_ATTRIBUTE_EVENT_LISTENER(resourcetimingbufferfull); |
100 | 100 |
101 void clearFrameTimings(); | |
102 void setFrameTimingBufferSize(unsigned); | |
103 | |
104 DEFINE_ATTRIBUTE_EVENT_LISTENER(frametimingbufferfull); | |
105 | |
106 void AddLongTaskTiming(double start_time, | 101 void AddLongTaskTiming(double start_time, |
107 double end_time, | 102 double end_time, |
108 const String& name, | 103 const String& name, |
109 const String& culprit_frame_src, | 104 const String& culprit_frame_src, |
110 const String& culprit_frame_id, | 105 const String& culprit_frame_id, |
111 const String& culprit_frame_name); | 106 const String& culprit_frame_name); |
112 | 107 |
113 void AddResourceTiming(const ResourceTimingInfo&); | 108 void AddResourceTiming(const ResourceTimingInfo&); |
114 | 109 |
115 void NotifyNavigationTimingToObservers(); | 110 void NotifyNavigationTimingToObservers(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 148 |
154 // Expect Performance to override this method, | 149 // Expect Performance to override this method, |
155 // WorkerPerformance doesn't have to override this. | 150 // WorkerPerformance doesn't have to override this. |
156 virtual PerformanceNavigationTiming* CreateNavigationTimingInstance() { | 151 virtual PerformanceNavigationTiming* CreateNavigationTimingInstance() { |
157 return nullptr; | 152 return nullptr; |
158 } | 153 } |
159 | 154 |
160 bool IsResourceTimingBufferFull(); | 155 bool IsResourceTimingBufferFull(); |
161 void AddResourceTimingBuffer(PerformanceEntry&); | 156 void AddResourceTimingBuffer(PerformanceEntry&); |
162 | 157 |
163 bool IsFrameTimingBufferFull(); | |
164 void AddFrameTimingBuffer(PerformanceEntry&); | |
165 | |
166 void NotifyObserversOfEntry(PerformanceEntry&); | 158 void NotifyObserversOfEntry(PerformanceEntry&); |
167 void NotifyObserversOfEntries(PerformanceEntryVector&); | 159 void NotifyObserversOfEntries(PerformanceEntryVector&); |
168 bool HasObserverFor(PerformanceEntry::EntryType) const; | 160 bool HasObserverFor(PerformanceEntry::EntryType) const; |
169 | 161 |
170 void DeliverObservationsTimerFired(TimerBase*); | 162 void DeliverObservationsTimerFired(TimerBase*); |
171 | 163 |
172 PerformanceEntryVector frame_timing_buffer_; | 164 PerformanceEntryVector frame_timing_buffer_; |
173 unsigned frame_timing_buffer_size_; | 165 unsigned frame_timing_buffer_size_; |
174 PerformanceEntryVector resource_timing_buffer_; | 166 PerformanceEntryVector resource_timing_buffer_; |
175 unsigned resource_timing_buffer_size_; | 167 unsigned resource_timing_buffer_size_; |
176 Member<PerformanceEntry> navigation_timing_; | 168 Member<PerformanceEntry> navigation_timing_; |
177 Member<UserTiming> user_timing_; | 169 Member<UserTiming> user_timing_; |
178 Member<PerformanceEntry> first_paint_timing_; | 170 Member<PerformanceEntry> first_paint_timing_; |
179 Member<PerformanceEntry> first_contentful_paint_timing_; | 171 Member<PerformanceEntry> first_contentful_paint_timing_; |
180 | 172 |
181 double time_origin_; | 173 double time_origin_; |
182 | 174 |
183 PerformanceEntryTypeMask observer_filter_options_; | 175 PerformanceEntryTypeMask observer_filter_options_; |
184 PerformanceObservers observers_; | 176 PerformanceObservers observers_; |
185 PerformanceObservers active_observers_; | 177 PerformanceObservers active_observers_; |
186 PerformanceObservers suspended_observers_; | 178 PerformanceObservers suspended_observers_; |
187 TaskRunnerTimer<PerformanceBase> deliver_observations_timer_; | 179 TaskRunnerTimer<PerformanceBase> deliver_observations_timer_; |
188 }; | 180 }; |
189 | 181 |
190 } // namespace blink | 182 } // namespace blink |
191 | 183 |
192 #endif // PerformanceBase_h | 184 #endif // PerformanceBase_h |
OLD | NEW |