| 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 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 #ifndef PerformanceBase_h | 32 #ifndef PerformanceBase_h |
| 33 #define PerformanceBase_h | 33 #define PerformanceBase_h |
| 34 | 34 |
| 35 #include "core/CoreExport.h" | 35 #include "core/CoreExport.h" |
| 36 #include "core/dom/DOMHighResTimeStamp.h" | 36 #include "core/dom/DOMHighResTimeStamp.h" |
| 37 #include "core/events/EventTarget.h" | 37 #include "core/events/EventTarget.h" |
| 38 #include "core/loader/FrameLoaderTypes.h" | 38 #include "core/loader/FrameLoaderTypes.h" |
| 39 #include "core/timing/PerformanceEntry.h" | 39 #include "core/timing/PerformanceEntry.h" |
| 40 #include "core/timing/PerformanceNavigationTiming.h" | 40 #include "core/timing/PerformanceNavigationTiming.h" |
| 41 #include "core/timing/PerformancePaintTiming.h" |
| 41 #include "platform/Timer.h" | 42 #include "platform/Timer.h" |
| 42 #include "platform/heap/Handle.h" | 43 #include "platform/heap/Handle.h" |
| 43 #include "wtf/Forward.h" | 44 #include "wtf/Forward.h" |
| 44 #include "wtf/HashSet.h" | 45 #include "wtf/HashSet.h" |
| 45 #include "wtf/ListHashSet.h" | 46 #include "wtf/ListHashSet.h" |
| 46 #include "wtf/Vector.h" | 47 #include "wtf/Vector.h" |
| 47 | 48 |
| 48 namespace blink { | 49 namespace blink { |
| 49 | 50 |
| 50 class ExceptionState; | 51 class ExceptionState; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 double endTime, | 107 double endTime, |
| 107 const String& name, | 108 const String& name, |
| 108 const String& culpritFrameSrc, | 109 const String& culpritFrameSrc, |
| 109 const String& culpritFrameId, | 110 const String& culpritFrameId, |
| 110 const String& culpritFrameName); | 111 const String& culpritFrameName); |
| 111 | 112 |
| 112 void addResourceTiming(const ResourceTimingInfo&); | 113 void addResourceTiming(const ResourceTimingInfo&); |
| 113 | 114 |
| 114 void addNavigationTiming(LocalFrame*); | 115 void addNavigationTiming(LocalFrame*); |
| 115 | 116 |
| 117 void addFirstPaintTiming(double startTime); |
| 118 |
| 119 void addFirstContentfulPaintTiming(double startTime); |
| 120 |
| 116 void mark(const String& markName, ExceptionState&); | 121 void mark(const String& markName, ExceptionState&); |
| 117 void clearMarks(const String& markName); | 122 void clearMarks(const String& markName); |
| 118 | 123 |
| 119 void measure(const String& measureName, | 124 void measure(const String& measureName, |
| 120 const String& startMark, | 125 const String& startMark, |
| 121 const String& endMark, | 126 const String& endMark, |
| 122 ExceptionState&); | 127 ExceptionState&); |
| 123 void clearMeasures(const String& measureName); | 128 void clearMeasures(const String& measureName); |
| 124 | 129 |
| 125 void unregisterPerformanceObserver(PerformanceObserver&); | 130 void unregisterPerformanceObserver(PerformanceObserver&); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 138 static bool allowsTimingRedirect(const Vector<ResourceResponse>&, | 143 static bool allowsTimingRedirect(const Vector<ResourceResponse>&, |
| 139 const ResourceResponse&, | 144 const ResourceResponse&, |
| 140 const SecurityOrigin&, | 145 const SecurityOrigin&, |
| 141 ExecutionContext*); | 146 ExecutionContext*); |
| 142 | 147 |
| 143 static bool passesTimingAllowCheck(const ResourceResponse&, | 148 static bool passesTimingAllowCheck(const ResourceResponse&, |
| 144 const SecurityOrigin&, | 149 const SecurityOrigin&, |
| 145 const AtomicString&, | 150 const AtomicString&, |
| 146 ExecutionContext*); | 151 ExecutionContext*); |
| 147 | 152 |
| 153 void addPaintTiming(PerformancePaintTiming::PaintType, double startTime); |
| 154 |
| 148 protected: | 155 protected: |
| 149 explicit PerformanceBase(double timeOrigin); | 156 explicit PerformanceBase(double timeOrigin); |
| 150 | 157 |
| 151 bool isResourceTimingBufferFull(); | 158 bool isResourceTimingBufferFull(); |
| 152 void addResourceTimingBuffer(PerformanceEntry&); | 159 void addResourceTimingBuffer(PerformanceEntry&); |
| 153 | 160 |
| 154 bool isFrameTimingBufferFull(); | 161 bool isFrameTimingBufferFull(); |
| 155 void addFrameTimingBuffer(PerformanceEntry&); | 162 void addFrameTimingBuffer(PerformanceEntry&); |
| 156 | 163 |
| 157 void notifyObserversOfEntry(PerformanceEntry&); | 164 void notifyObserversOfEntry(PerformanceEntry&); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 171 PerformanceEntryTypeMask m_observerFilterOptions; | 178 PerformanceEntryTypeMask m_observerFilterOptions; |
| 172 PerformanceObservers m_observers; | 179 PerformanceObservers m_observers; |
| 173 PerformanceObservers m_activeObservers; | 180 PerformanceObservers m_activeObservers; |
| 174 PerformanceObservers m_suspendedObservers; | 181 PerformanceObservers m_suspendedObservers; |
| 175 Timer<PerformanceBase> m_deliverObservationsTimer; | 182 Timer<PerformanceBase> m_deliverObservationsTimer; |
| 176 }; | 183 }; |
| 177 | 184 |
| 178 } // namespace blink | 185 } // namespace blink |
| 179 | 186 |
| 180 #endif // PerformanceBase_h | 187 #endif // PerformanceBase_h |
| OLD | NEW |