| Index: Source/core/timing/PerformanceDrawTiming.h
|
| diff --git a/Source/core/timing/PerformanceEntry.h b/Source/core/timing/PerformanceDrawTiming.h
|
| similarity index 56%
|
| copy from Source/core/timing/PerformanceEntry.h
|
| copy to Source/core/timing/PerformanceDrawTiming.h
|
| index 1981103cf915b2145c84c74f7d0194c86c215b70..a6ed185e85cefb69e8a7a55f91e05948eea86e00 100644
|
| --- a/Source/core/timing/PerformanceEntry.h
|
| +++ b/Source/core/timing/PerformanceDrawTiming.h
|
| @@ -29,47 +29,55 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef PerformanceEntry_h
|
| -#define PerformanceEntry_h
|
| +#ifndef PerformanceDrawTiming_h
|
| +#define PerformanceDrawTiming_h
|
|
|
| -#include "bindings/core/v8/ScriptWrappable.h"
|
| +#include "core/timing/PerformanceEntry.h"
|
| #include "platform/heap/Handle.h"
|
| #include "wtf/PassRefPtr.h"
|
| -#include "wtf/RefCounted.h"
|
| -#include "wtf/text/WTFString.h"
|
| +#include "wtf/RefPtr.h"
|
|
|
| namespace WebCore {
|
|
|
| -class PerformanceEntry : public RefCountedWillBeGarbageCollectedFinalized<PerformanceEntry>, public ScriptWrappable {
|
| -public:
|
| - virtual ~PerformanceEntry();
|
| -
|
| - String name() const;
|
| - String entryType() const;
|
| - double startTime() const;
|
| - double duration() const;
|
| +class Document;
|
| +class KURL;
|
| +class ResourceLoadTiming;
|
| +class ResourceRequest;
|
| +class ResourceResponse;
|
| +class ResourceTimingInfo;
|
|
|
| - virtual bool isResource() { return false; }
|
| - virtual bool isMark() { return false; }
|
| - virtual bool isMeasure() { return false; }
|
| +class PerformanceDrawTiming FINAL : public PerformanceEntry {
|
| +public:
|
| + static PassRefPtrWillBeRawPtr<PerformanceDrawTiming> create(Document* requestingDocument, unsigned sourceFrame, double startTime, bool isFinal)
|
| + {
|
| + return adoptRefWillBeNoop(new PerformanceDrawTiming(requestingDocument, sourceFrame, startTime, isFinal));
|
| + }
|
|
|
| - static bool startTimeCompareLessThan(PassRefPtrWillBeRawPtr<PerformanceEntry> a, PassRefPtrWillBeRawPtr<PerformanceEntry> b)
|
| + static PassRefPtrWillBeRawPtr<PerformanceDrawTiming> create(Document* requestingDocument, unsigned sourceFrame, double startTime)
|
| {
|
| - return a->startTime() < b->startTime();
|
| + return adoptRefWillBeNoop(new PerformanceDrawTiming(requestingDocument, sourceFrame, startTime, false));
|
| }
|
|
|
| - virtual void trace(Visitor*) { }
|
| + unsigned sourceFrame() const;
|
|
|
| -protected:
|
| - PerformanceEntry(const String& name, const String& entryType, double startTime, double finishTime);
|
| + bool isFinal() const;
|
| +
|
| + virtual bool isDraw() OVERRIDE { return true; }
|
| +
|
| + virtual void trace(Visitor* visitor)
|
| + {
|
| + PerformanceEntry::trace(visitor);
|
| + }
|
|
|
| private:
|
| - const String m_name;
|
| - const String m_entryType;
|
| - const double m_startTime;
|
| - const double m_duration;
|
| + PerformanceDrawTiming(Document* requestingDocument, unsigned sourceFrame, double startTime, bool isFinal);
|
| + virtual ~PerformanceDrawTiming();
|
| +
|
| + unsigned m_sourceFrame;
|
| + bool m_isFinal;
|
| + RefPtr<Document> m_requestingDocument;
|
| };
|
|
|
| }
|
|
|
| -#endif // !defined(PerformanceEntry_h)
|
| +#endif // !defined(PerformanceDrawTiming_h)
|
|
|