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

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.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
(Empty)
1 /*
2 * Copyright (C) 2016 Google Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
13 * distribution.
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef PerformanceNavigationTiming_h
32 #define PerformanceNavigationTiming_h
33
34 #include "core/CoreExport.h"
35 #include "core/frame/DOMWindowProperty.h"
36 #include "core/timing/PerformanceResourceTiming.h"
37 #include "wtf/Forward.h"
38
39 namespace blink {
40
41 class DocumentLoadTiming;
42 class DocumentLoader;
43 class DocumentTiming;
44
45 class CORE_EXPORT PerformanceNavigationTiming final
46 : public PerformanceResourceTiming {
47 DEFINE_WRAPPERTYPEINFO();
48
49 public:
50 static PerformanceNavigationTiming* create(
51 double timeOrigin,
52 double unloadEventStart,
53 double unloadEventEnd,
54 double loadEventStart,
55 double loadEventEnd,
56 unsigned short redirectCount,
57 double domInteractive,
58 double domContentLoadedEventStart,
59 double domContentLoadedEventEnd,
60 double domComplete,
61 AtomicString type,
62 double redirectStart,
63 double redirectEnd,
64 double fetchStart,
65 double responseEnd,
66 bool hasCrossOriginRedirect,
67 bool hasSameOriginAsPreviousDocument,
68 ResourceLoadTiming* timing,
69 double lastRedirectEndTime,
70 double finishTime,
71 unsigned long long transferSize,
72 unsigned long long encodedBodyLength,
73 unsigned long long decodedBodyLength,
74 bool didReuseConnection) {
75 return new PerformanceNavigationTiming(
76 timeOrigin, unloadEventStart, unloadEventEnd, loadEventStart,
77 loadEventEnd, redirectCount, domInteractive, domContentLoadedEventStart,
78 domContentLoadedEventEnd, domComplete, type, redirectStart, redirectEnd,
79 fetchStart, responseEnd, hasCrossOriginRedirect,
80 hasSameOriginAsPreviousDocument, "", timing, lastRedirectEndTime,
81 finishTime, transferSize, encodedBodyLength, decodedBodyLength,
82 didReuseConnection, true /*allowTimingDetails*/,
83 true /*allowRediectDetails*/, "document", "navigation", timeOrigin);
84 }
85
86 double unloadEventStart() const;
87 double unloadEventEnd() const;
88 double domInteractive() const;
89 double domContentLoadedEventStart() const;
90 double domContentLoadedEventEnd() const;
91 double domComplete() const;
92 double loadEventStart() const;
93 double loadEventEnd() const;
94 AtomicString type() const;
95 unsigned short redirectCount() const;
96
97 double fetchStart() const override;
98 double redirectStart() const override;
99 double redirectEnd() const override;
100 double responseEnd() const override;
101
102 bool correctSequence() const;
103
104 protected:
105 void buildJSONValue(V8ObjectBuilder&) const override;
106
107 private:
108 explicit PerformanceNavigationTiming(double timeOrigin,
109 double unloadEventStart,
110 double unloadEventEnd,
111 double loadEventStart,
112 double loadEventEnd,
113 unsigned short redirectCount,
114 double domInteractive,
115 double domContentLoadedEventStart,
116 double domContentLoadedEventEnd,
117 double domComplete,
118 AtomicString type,
119 double redirectStart,
120 double redirectEnd,
121 double fetchStart,
122 double responseEnd,
123 bool hasCrossOriginRedirect,
124 bool hasSameOriginAsPreviousDocument,
125 const AtomicString& initiatorType,
126 ResourceLoadTiming*,
127 double lastRedirectEndTime,
128 double finishTime,
129 unsigned long long transferSize,
130 unsigned long long encodedBodyLength,
131 unsigned long long decodedBodyLength,
132 bool didReuseConnection,
133 bool allowTimingDetails,
134 bool allowRedirectDetails,
135 const String& name,
136 const String& entryType,
137 double startTime);
138
139 ~PerformanceNavigationTiming() override;
140
141 double m_timeOrigin;
142 double m_unloadEventStart;
143 double m_unloadEventEnd;
144 double m_loadEventStart;
145 double m_loadEventEnd;
146 unsigned short m_redirectCount;
147 double m_domInteractive;
148 double m_domContentLoadedEventStart;
149 double m_domContentLoadedEventEnd;
150 double m_domComplete;
151 AtomicString m_type;
152 double m_redirectStart;
153 double m_redirectEnd;
154 double m_fetchStart;
155 double m_responseEnd;
156 bool m_hasCrossOriginRedirect;
157 bool m_hasSameOriginAsPreviousDocument;
158 };
159 } // namespace blink
160
161 #endif // PerformanceNavigationTiming_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698