| 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; | |
| 48 | 47 |
| 49 class PerformanceResourceTiming : public PerformanceEntry { | 48 class PerformanceResourceTiming : public PerformanceEntry { |
| 50 public: | 49 public: |
| 51 static PassRefPtr<PerformanceResourceTiming> create(const ResourceTimingInfo
& info, Document* requestingDocument, double startTime, double lastRedirectEndTi
me, bool m_allowTimingDetails, bool m_allowRedirectDetails) | 50 static PassRefPtr<PerformanceResourceTiming> create(const AtomicString& init
iatorType, const ResourceRequest& request, const ResourceResponse& response, dou
ble initiationTime, double finishTime, Document* requestingDocument) |
| 52 { | 51 { |
| 53 return adoptRef(new PerformanceResourceTiming(info, requestingDocument,
startTime, lastRedirectEndTime, m_allowTimingDetails, m_allowRedirectDetails)); | 52 return adoptRef(new PerformanceResourceTiming(initiatorType, request, re
sponse, initiationTime, finishTime, requestingDocument)); |
| 54 } | |
| 55 | |
| 56 static PassRefPtr<PerformanceResourceTiming> create(const ResourceTimingInfo
& info, Document* requestingDocument, double startTime, bool m_allowTimingDetail
s) | |
| 57 { | |
| 58 return adoptRef(new PerformanceResourceTiming(info, requestingDocument,
startTime, 0.0, m_allowTimingDetails, false)); | |
| 59 } | 53 } |
| 60 | 54 |
| 61 AtomicString initiatorType() const; | 55 AtomicString initiatorType() const; |
| 62 | 56 |
| 63 double redirectStart() const; | 57 double redirectStart() const; |
| 64 double redirectEnd() const; | 58 double redirectEnd() const; |
| 65 double fetchStart() const; | 59 double fetchStart() const; |
| 66 double domainLookupStart() const; | 60 double domainLookupStart() const; |
| 67 double domainLookupEnd() const; | 61 double domainLookupEnd() const; |
| 68 double connectStart() const; | 62 double connectStart() const; |
| 69 double connectEnd() const; | 63 double connectEnd() const; |
| 70 double secureConnectionStart() const; | 64 double secureConnectionStart() const; |
| 71 double requestStart() const; | 65 double requestStart() const; |
| 72 double responseStart() const; | 66 double responseStart() const; |
| 73 double responseEnd() const; | 67 double responseEnd() const; |
| 74 | 68 |
| 75 virtual bool isResource() { return true; } | 69 virtual bool isResource() { return true; } |
| 76 | 70 |
| 77 private: | 71 private: |
| 78 PerformanceResourceTiming(const ResourceTimingInfo&, Document* requestingDoc
ument, double startTime, double lastRedirectEndTime, bool m_allowTimingDetails,
bool m_allowRedirectDetails); | 72 PerformanceResourceTiming(const AtomicString& initatorType, const ResourceRe
quest&, const ResourceResponse&, double initiationTime, double finishTime, Docum
ent*); |
| 79 ~PerformanceResourceTiming(); | 73 ~PerformanceResourceTiming(); |
| 80 | 74 |
| 81 AtomicString m_initiatorType; | 75 AtomicString m_initiatorType; |
| 82 RefPtr<ResourceLoadTiming> m_timing; | 76 RefPtr<ResourceLoadTiming> m_timing; |
| 83 double m_lastRedirectEndTime; | |
| 84 double m_finishTime; | 77 double m_finishTime; |
| 85 bool m_didReuseConnection; | 78 bool m_didReuseConnection; |
| 86 bool m_allowTimingDetails; | 79 bool m_shouldReportDetails; |
| 87 bool m_allowRedirectDetails; | |
| 88 RefPtr<Document> m_requestingDocument; | 80 RefPtr<Document> m_requestingDocument; |
| 89 }; | 81 }; |
| 90 | 82 |
| 91 } | 83 } |
| 92 | 84 |
| 93 #endif // !defined(PerformanceResourceTiming_h) | 85 #endif // !defined(PerformanceResourceTiming_h) |
| OLD | NEW |