| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 26 matching lines...) Expand all Loading... |
| 37 #include <wtf/RefPtr.h> | 37 #include <wtf/RefPtr.h> |
| 38 #include <wtf/text/WTFString.h> | 38 #include <wtf/text/WTFString.h> |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 class Document; | 42 class Document; |
| 43 class KURL; | 43 class KURL; |
| 44 class ResourceLoadTiming; | 44 class ResourceLoadTiming; |
| 45 class ResourceRequest; | 45 class ResourceRequest; |
| 46 class ResourceResponse; | 46 class ResourceResponse; |
| 47 class ResourceTimingInfo; |
| 47 | 48 |
| 48 class PerformanceResourceTiming : public PerformanceEntry { | 49 class PerformanceResourceTiming : public PerformanceEntry { |
| 49 public: | 50 public: |
| 50 static PassRefPtr<PerformanceResourceTiming> create(const AtomicString& init
iatorType, const ResourceRequest& request, const ResourceResponse& response, dou
ble initiationTime, double finishTime, Document* requestingDocument) | 51 static PassRefPtr<PerformanceResourceTiming> create(const ResourceTimingInfo
& info, Document* requestingDocument, double startTime, double lastRedirectEndTi
me, bool shouldReportDetails) |
| 51 { | 52 { |
| 52 return adoptRef(new PerformanceResourceTiming(initiatorType, request, re
sponse, initiationTime, finishTime, requestingDocument)); | 53 return adoptRef(new PerformanceResourceTiming(info, requestingDocument,
startTime, lastRedirectEndTime, shouldReportDetails)); |
| 53 } | 54 } |
| 54 | 55 |
| 55 AtomicString initiatorType() const; | 56 AtomicString initiatorType() const; |
| 56 | 57 |
| 57 double redirectStart() const; | 58 double redirectStart() const; |
| 58 double redirectEnd() const; | 59 double redirectEnd() const; |
| 59 double fetchStart() const; | 60 double fetchStart() const; |
| 60 double domainLookupStart() const; | 61 double domainLookupStart() const; |
| 61 double domainLookupEnd() const; | 62 double domainLookupEnd() const; |
| 62 double connectStart() const; | 63 double connectStart() const; |
| 63 double connectEnd() const; | 64 double connectEnd() const; |
| 64 double secureConnectionStart() const; | 65 double secureConnectionStart() const; |
| 65 double requestStart() const; | 66 double requestStart() const; |
| 66 double responseStart() const; | 67 double responseStart() const; |
| 67 double responseEnd() const; | 68 double responseEnd() const; |
| 68 | 69 |
| 69 virtual bool isResource() { return true; } | 70 virtual bool isResource() { return true; } |
| 70 | 71 |
| 71 private: | 72 private: |
| 72 PerformanceResourceTiming(const AtomicString& initatorType, const ResourceRe
quest&, const ResourceResponse&, double initiationTime, double finishTime, Docum
ent*); | 73 PerformanceResourceTiming(const ResourceTimingInfo& info, Document* requesti
ngDocument, double startTime, double lastRedirectEndTime, bool shouldReportDetai
ls); |
| 73 ~PerformanceResourceTiming(); | 74 ~PerformanceResourceTiming(); |
| 74 | 75 |
| 75 double resourceTimeToDocumentMilliseconds(int deltaMilliseconds) const; | 76 double resourceTimeToDocumentMilliseconds(int deltaMilliseconds) const; |
| 76 | 77 |
| 77 AtomicString m_initiatorType; | 78 AtomicString m_initiatorType; |
| 78 RefPtr<ResourceLoadTiming> m_timing; | 79 RefPtr<ResourceLoadTiming> m_timing; |
| 80 double m_lastRedirectEndTime; |
| 79 double m_finishTime; | 81 double m_finishTime; |
| 80 bool m_didReuseConnection; | 82 bool m_didReuseConnection; |
| 81 bool m_shouldReportDetails; | 83 bool m_shouldReportDetails; |
| 82 RefPtr<Document> m_requestingDocument; | 84 RefPtr<Document> m_requestingDocument; |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 } | 87 } |
| 86 | 88 |
| 87 #endif // !defined(PerformanceResourceTiming_h) | 89 #endif // !defined(PerformanceResourceTiming_h) |
| OLD | NEW |