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 20 matching lines...) Expand all Loading... |
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/Forward.h" | 37 #include "wtf/Forward.h" |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 class Document; | |
42 class ResourceLoadTiming; | 41 class ResourceLoadTiming; |
43 class ResourceTimingInfo; | 42 class ResourceTimingInfo; |
44 | 43 |
45 class PerformanceResourceTiming final : public PerformanceEntry { | 44 class PerformanceResourceTiming final : public PerformanceEntry { |
46 DEFINE_WRAPPERTYPEINFO(); | 45 DEFINE_WRAPPERTYPEINFO(); |
47 public: | 46 public: |
48 static PerformanceResourceTiming* create(const ResourceTimingInfo& info, Doc
ument* requestingDocument, double startTime, double lastRedirectEndTime, bool m_
allowTimingDetails, bool m_allowRedirectDetails) | 47 static PerformanceResourceTiming* create(const ResourceTimingInfo& info, dou
ble timeOrigin, double startTime, double lastRedirectEndTime, bool m_allowTiming
Details, bool m_allowRedirectDetails) |
49 { | 48 { |
50 return new PerformanceResourceTiming(info, requestingDocument, startTime
, lastRedirectEndTime, m_allowTimingDetails, m_allowRedirectDetails); | 49 return new PerformanceResourceTiming(info, timeOrigin, startTime, lastRe
directEndTime, m_allowTimingDetails, m_allowRedirectDetails); |
51 } | 50 } |
52 | 51 |
53 static PerformanceResourceTiming* create(const ResourceTimingInfo& info, Doc
ument* requestingDocument, double startTime, bool m_allowTimingDetails) | 52 static PerformanceResourceTiming* create(const ResourceTimingInfo& info, dou
ble timeOrigin, double startTime, bool m_allowTimingDetails) |
54 { | 53 { |
55 return new PerformanceResourceTiming(info, requestingDocument, startTime
, 0.0, m_allowTimingDetails, false); | 54 return new PerformanceResourceTiming(info, timeOrigin, startTime, 0.0, m
_allowTimingDetails, false); |
56 } | 55 } |
57 | 56 |
58 AtomicString initiatorType() const; | 57 AtomicString initiatorType() const; |
59 | 58 |
60 double workerStart() const; | 59 double workerStart() const; |
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(); | |
76 | |
77 private: | 74 private: |
78 PerformanceResourceTiming(const ResourceTimingInfo&, Document* requestingDoc
ument, double startTime, double lastRedirectEndTime, bool m_allowTimingDetails,
bool m_allowRedirectDetails); | 75 PerformanceResourceTiming(const ResourceTimingInfo&, double timeOrigin, doub
le startTime, double lastRedirectEndTime, bool m_allowTimingDetails, bool m_allo
wRedirectDetails); |
79 virtual ~PerformanceResourceTiming(); | 76 virtual ~PerformanceResourceTiming(); |
80 | 77 |
81 double workerReady() const; | 78 double workerReady() const; |
82 | 79 |
83 AtomicString m_initiatorType; | 80 AtomicString m_initiatorType; |
84 RefPtrWillBeMember<Document> m_requestingDocument; | 81 double m_timeOrigin; |
85 RefPtr<ResourceLoadTiming> m_timing; | 82 RefPtr<ResourceLoadTiming> m_timing; |
86 double m_lastRedirectEndTime; | 83 double m_lastRedirectEndTime; |
87 double m_finishTime; | 84 double m_finishTime; |
88 bool m_didReuseConnection; | 85 bool m_didReuseConnection; |
89 bool m_allowTimingDetails; | 86 bool m_allowTimingDetails; |
90 bool m_allowRedirectDetails; | 87 bool m_allowRedirectDetails; |
91 }; | 88 }; |
92 | 89 |
93 } // namespace blink | 90 } // namespace blink |
94 | 91 |
95 #endif // PerformanceResourceTiming_h | 92 #endif // PerformanceResourceTiming_h |
OLD | NEW |