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 16 matching lines...) Expand all Loading... |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 #ifndef PerformanceResourceTiming_h | 32 #ifndef PerformanceResourceTiming_h |
33 #define PerformanceResourceTiming_h | 33 #define PerformanceResourceTiming_h |
34 | 34 |
35 #include "core/timing/PerformanceEntry.h" | 35 #include "core/timing/PerformanceEntry.h" |
36 #include "platform/heap/Handle.h" | 36 #include "platform/heap/Handle.h" |
37 #include "wtf/PassRefPtr.h" | 37 #include "wtf/Forward.h" |
38 #include "wtf/RefPtr.h" | |
39 | 38 |
40 namespace blink { | 39 namespace blink { |
41 | 40 |
42 class Document; | 41 class Document; |
43 class ResourceLoadTiming; | 42 class ResourceLoadTiming; |
44 class ResourceTimingInfo; | 43 class ResourceTimingInfo; |
45 | 44 |
46 class PerformanceResourceTiming final : public PerformanceEntry { | 45 class PerformanceResourceTiming final : public PerformanceEntry { |
47 DEFINE_WRAPPERTYPEINFO(); | 46 DEFINE_WRAPPERTYPEINFO(); |
48 public: | 47 public: |
49 static PassRefPtrWillBeRawPtr<PerformanceResourceTiming> create(const Resour
ceTimingInfo& info, Document* requestingDocument, double startTime, double lastR
edirectEndTime, bool m_allowTimingDetails, bool m_allowRedirectDetails) | 48 static PerformanceResourceTiming* create(const ResourceTimingInfo& info, Doc
ument* requestingDocument, double startTime, double lastRedirectEndTime, bool m_
allowTimingDetails, bool m_allowRedirectDetails) |
50 { | 49 { |
51 return adoptRefWillBeNoop(new PerformanceResourceTiming(info, requesting
Document, startTime, lastRedirectEndTime, m_allowTimingDetails, m_allowRedirectD
etails)); | 50 return new PerformanceResourceTiming(info, requestingDocument, startTime
, lastRedirectEndTime, m_allowTimingDetails, m_allowRedirectDetails); |
52 } | 51 } |
53 | 52 |
54 static PassRefPtrWillBeRawPtr<PerformanceResourceTiming> create(const Resour
ceTimingInfo& info, Document* requestingDocument, double startTime, bool m_allow
TimingDetails) | 53 static PerformanceResourceTiming* create(const ResourceTimingInfo& info, Doc
ument* requestingDocument, double startTime, bool m_allowTimingDetails) |
55 { | 54 { |
56 return adoptRefWillBeNoop(new PerformanceResourceTiming(info, requesting
Document, startTime, 0.0, m_allowTimingDetails, false)); | 55 return new PerformanceResourceTiming(info, requestingDocument, startTime
, 0.0, m_allowTimingDetails, false); |
57 } | 56 } |
58 | 57 |
59 AtomicString initiatorType() const; | 58 AtomicString initiatorType() const; |
60 | 59 |
61 double redirectStart() const; | 60 double redirectStart() const; |
62 double redirectEnd() const; | 61 double redirectEnd() const; |
63 double fetchStart() const; | 62 double fetchStart() const; |
64 double domainLookupStart() const; | 63 double domainLookupStart() const; |
65 double domainLookupEnd() const; | 64 double domainLookupEnd() const; |
66 double connectStart() const; | 65 double connectStart() const; |
67 double connectEnd() const; | 66 double connectEnd() const; |
68 double secureConnectionStart() const; | 67 double secureConnectionStart() const; |
69 double requestStart() const; | 68 double requestStart() const; |
70 double responseStart() const; | 69 double responseStart() const; |
71 double responseEnd() const; | 70 double responseEnd() const; |
72 | 71 |
73 virtual bool isResource() override { return true; } | 72 virtual bool isResource() override { return true; } |
74 | 73 |
75 DECLARE_VIRTUAL_TRACE(); | 74 DECLARE_VIRTUAL_TRACE(); |
76 | 75 |
77 private: | 76 private: |
78 PerformanceResourceTiming(const ResourceTimingInfo&, Document* requestingDoc
ument, double startTime, double lastRedirectEndTime, bool m_allowTimingDetails,
bool m_allowRedirectDetails); | 77 PerformanceResourceTiming(const ResourceTimingInfo&, Document* requestingDoc
ument, double startTime, double lastRedirectEndTime, bool m_allowTimingDetails,
bool m_allowRedirectDetails); |
79 virtual ~PerformanceResourceTiming(); | 78 virtual ~PerformanceResourceTiming(); |
80 | 79 |
81 AtomicString m_initiatorType; | 80 AtomicString m_initiatorType; |
| 81 RefPtrWillBeMember<Document> m_requestingDocument; |
82 RefPtr<ResourceLoadTiming> m_timing; | 82 RefPtr<ResourceLoadTiming> m_timing; |
83 double m_lastRedirectEndTime; | 83 double m_lastRedirectEndTime; |
84 double m_finishTime; | 84 double m_finishTime; |
85 bool m_didReuseConnection; | 85 bool m_didReuseConnection; |
86 bool m_allowTimingDetails; | 86 bool m_allowTimingDetails; |
87 bool m_allowRedirectDetails; | 87 bool m_allowRedirectDetails; |
88 RefPtrWillBeMember<Document> m_requestingDocument; | |
89 }; | 88 }; |
90 | 89 |
91 } // namespace blink | 90 } // namespace blink |
92 | 91 |
93 #endif // PerformanceResourceTiming_h | 92 #endif // PerformanceResourceTiming_h |
OLD | NEW |