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 enum class ShouldAddToBuffer { | 110 enum class ShouldAddToBuffer { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 154 |
160 // Expect Performance to override this method, | 155 // Expect Performance to override this method, |
161 // WorkerPerformance doesn't have to override this. | 156 // WorkerPerformance doesn't have to override this. |
162 virtual PerformanceNavigationTiming* CreateNavigationTimingInstance() { | 157 virtual PerformanceNavigationTiming* CreateNavigationTimingInstance() { |
163 return nullptr; | 158 return nullptr; |
164 } | 159 } |
165 | 160 |
166 bool IsResourceTimingBufferFull(); | 161 bool IsResourceTimingBufferFull(); |
167 void AddResourceTimingBuffer(PerformanceEntry&); | 162 void AddResourceTimingBuffer(PerformanceEntry&); |
168 | 163 |
169 bool IsFrameTimingBufferFull(); | |
170 void AddFrameTimingBuffer(PerformanceEntry&); | 164 void AddFrameTimingBuffer(PerformanceEntry&); |
171 | 165 |
172 void NotifyObserversOfEntry(PerformanceEntry&); | 166 void NotifyObserversOfEntry(PerformanceEntry&); |
173 void NotifyObserversOfEntries(PerformanceEntryVector&); | 167 void NotifyObserversOfEntries(PerformanceEntryVector&); |
174 bool HasObserverFor(PerformanceEntry::EntryType) const; | 168 bool HasObserverFor(PerformanceEntry::EntryType) const; |
175 | 169 |
176 void DeliverObservationsTimerFired(TimerBase*); | 170 void DeliverObservationsTimerFired(TimerBase*); |
177 | 171 |
178 PerformanceEntryVector frame_timing_buffer_; | 172 PerformanceEntryVector frame_timing_buffer_; |
179 unsigned frame_timing_buffer_size_; | 173 unsigned frame_timing_buffer_size_; |
(...skipping 10 matching lines...) Expand all Loading... |
190 PerformanceEntryTypeMask observer_filter_options_; | 184 PerformanceEntryTypeMask observer_filter_options_; |
191 PerformanceObservers observers_; | 185 PerformanceObservers observers_; |
192 PerformanceObservers active_observers_; | 186 PerformanceObservers active_observers_; |
193 PerformanceObservers suspended_observers_; | 187 PerformanceObservers suspended_observers_; |
194 TaskRunnerTimer<PerformanceBase> deliver_observations_timer_; | 188 TaskRunnerTimer<PerformanceBase> deliver_observations_timer_; |
195 }; | 189 }; |
196 | 190 |
197 } // namespace blink | 191 } // namespace blink |
198 | 192 |
199 #endif // PerformanceBase_h | 193 #endif // PerformanceBase_h |
OLD | NEW |