Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceResourceTiming.h

Issue 2472583003: Navigation Timing Level 2 (Closed)
Patch Set: First working version Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 23 matching lines...) Expand all
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 ResourceLoadTiming; 41 class ResourceLoadTiming;
42 class ResourceTimingInfo; 42 class ResourceTimingInfo;
43 43
44 class PerformanceResourceTiming final : public PerformanceEntry { 44 class CORE_EXPORT PerformanceResourceTiming : public PerformanceEntry {
45 DEFINE_WRAPPERTYPEINFO(); 45 DEFINE_WRAPPERTYPEINFO();
46 46
47 public: 47 public:
48 ~PerformanceResourceTiming() override;
48 static PerformanceResourceTiming* create(const ResourceTimingInfo& info, 49 static PerformanceResourceTiming* create(const ResourceTimingInfo& info,
49 double timeOrigin, 50 double timeOrigin,
50 double startTime, 51 double startTime,
51 double lastRedirectEndTime, 52 double lastRedirectEndTime,
52 bool allowTimingDetails, 53 bool allowTimingDetails,
53 bool allowRedirectDetails) { 54 bool allowRedirectDetails) {
54 return new PerformanceResourceTiming( 55 return new PerformanceResourceTiming(
55 info, timeOrigin, startTime, lastRedirectEndTime, allowTimingDetails, 56 info, timeOrigin, startTime, lastRedirectEndTime, allowTimingDetails,
56 allowRedirectDetails); 57 allowRedirectDetails);
57 } 58 }
58 59
59 static PerformanceResourceTiming* create(const ResourceTimingInfo& info, 60 static PerformanceResourceTiming* create(const ResourceTimingInfo& info,
60 double timeOrigin, 61 double timeOrigin,
61 double startTime, 62 double startTime,
62 bool allowTimingDetails) { 63 bool allowTimingDetails) {
63 return new PerformanceResourceTiming(info, timeOrigin, startTime, 0.0, 64 return new PerformanceResourceTiming(info, timeOrigin, startTime, 0.0,
64 allowTimingDetails, false); 65 allowTimingDetails, false);
65 } 66 }
66 67
67 AtomicString initiatorType() const; 68 AtomicString initiatorType() const;
68 69
69 double workerStart() const; 70 double workerStart() const;
70 double redirectStart() const; 71 virtual double redirectStart() const;
71 double redirectEnd() const; 72 virtual double redirectEnd() const;
72 double fetchStart() const; 73 virtual double fetchStart() const;
73 double domainLookupStart() const; 74 double domainLookupStart() const;
74 double domainLookupEnd() const; 75 double domainLookupEnd() const;
75 double connectStart() const; 76 double connectStart() const;
76 double connectEnd() const; 77 double connectEnd() const;
77 double secureConnectionStart() const; 78 double secureConnectionStart() const;
78 double requestStart() const; 79 double requestStart() const;
79 double responseStart() const; 80 double responseStart() const;
80 double responseEnd() const; 81 virtual double responseEnd() const;
81 unsigned long long transferSize() const; 82 unsigned long long transferSize() const;
82 unsigned long long encodedBodySize() const; 83 unsigned long long encodedBodySize() const;
83 unsigned long long decodedBodySize() const; 84 unsigned long long decodedBodySize() const;
84 85
85 protected: 86 protected:
86 void buildJSONValue(V8ObjectBuilder&) const override; 87 void buildJSONValue(V8ObjectBuilder&) const override;
87 88
89 PerformanceResourceTiming(const AtomicString& initiatorType,
90 double timeOrigin,
91 ResourceLoadTiming*,
92 double lastRedirectEndTime,
93 double finishTime,
94 unsigned long long transferSize,
95 unsigned long long encodedBodyLength,
96 unsigned long long decodedBodyLength,
97 bool didReuseConnection,
98 bool allowTimingDetails,
99 bool allowRedirectDetails,
100 const String& name,
101 const String& entryType,
102 double startTime);
103
88 private: 104 private:
89 PerformanceResourceTiming(const ResourceTimingInfo&, 105 PerformanceResourceTiming(const ResourceTimingInfo&,
90 double timeOrigin, 106 double timeOrigin,
91 double startTime, 107 double startTime,
92 double lastRedirectEndTime, 108 double lastRedirectEndTime,
93 bool m_allowTimingDetails, 109 bool m_allowTimingDetails,
94 bool m_allowRedirectDetails); 110 bool m_allowRedirectDetails);
95 ~PerformanceResourceTiming() override;
96 111
97 double workerReady() const; 112 double workerReady() const;
98 113
99 AtomicString m_initiatorType; 114 AtomicString m_initiatorType;
100 double m_timeOrigin; 115 double m_timeOrigin;
101 RefPtr<ResourceLoadTiming> m_timing; 116 RefPtr<ResourceLoadTiming> m_timing;
102 double m_lastRedirectEndTime; 117 double m_lastRedirectEndTime;
103 double m_finishTime; 118 double m_finishTime;
104 unsigned long long m_transferSize; 119 unsigned long long m_transferSize;
105 unsigned long long m_encodedBodySize; 120 unsigned long long m_encodedBodySize;
106 unsigned long long m_decodedBodySize; 121 unsigned long long m_decodedBodySize;
107 bool m_didReuseConnection; 122 bool m_didReuseConnection;
108 bool m_allowTimingDetails; 123 bool m_allowTimingDetails;
109 bool m_allowRedirectDetails; 124 bool m_allowRedirectDetails;
110 }; 125 };
111 126
112 } // namespace blink 127 } // namespace blink
113 128
114 #endif // PerformanceResourceTiming_h 129 #endif // PerformanceResourceTiming_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698