Chromium Code Reviews| Index: third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.h |
| diff --git a/third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.h b/third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.h |
| index 2022807a2be857ec1f24cf243f77aa202d37a238..27a41c9e04286be2bec74b941db0e9963085cbe2 100644 |
| --- a/third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.h |
| +++ b/third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.h |
| @@ -7,42 +7,47 @@ |
| #include "core/CoreExport.h" |
| #include "core/dom/DOMHighResTimeStamp.h" |
| +#include "core/loader/FrameLoaderTypes.h" |
| #include "core/timing/PerformanceResourceTiming.h" |
| namespace blink { |
| +class Document; |
| +class DocumentTiming; |
| +class DocumentLoader; |
| +class DocumentLoadTiming; |
| +class LocalFrame; |
| +class ExecutionContext; |
| +class ResourceTimingInfo; |
| + |
| class CORE_EXPORT PerformanceNavigationTiming final |
| : public PerformanceResourceTiming { |
| DEFINE_WRAPPERTYPEINFO(); |
| + friend class PerformanceNavigationTimingTest; |
| public: |
| - enum class NavigationType { Navigate, Reload, BackForward, Prerender }; |
| - |
| - PerformanceNavigationTiming(double timeOrigin, |
| - double unloadEventStart, |
| - double unloadEventEnd, |
| - double loadEventStart, |
| - double loadEventEnd, |
| - unsigned short redirectCount, |
| - double domInteractive, |
| - double domContentLoadedEventStart, |
| - double domContentLoadedEventEnd, |
| - double domComplete, |
| - NavigationType, |
| - double redirectStart, |
| - double redirectEnd, |
| - double fetchStart, |
| - double responseEnd, |
| - bool allowRedirectDetails, |
| - bool hasSameOriginAsPreviousDocument, |
| - ResourceLoadTiming*, |
| - double lastRedirectEndTime, |
| - double finishTime, |
| - unsigned long long transferSize, |
| - unsigned long long encodedBodyLength, |
| - unsigned long long decodedBodyLength, |
| - bool didReuseConnection); |
| + PerformanceNavigationTiming(LocalFrame*, |
| + std::unique_ptr<ResourceTimingInfo>, |
| + double timeOrigin); |
| + |
| + // Attributes inheritted from PerformanceEntry. |
| + DOMHighResTimeStamp duration() const override; |
| + // Attributes inherrited from PerformanceResourceTiming. |
|
panicker
2017/02/03 23:53:52
Add link to relevant section in design doc, and al
sunjian
2017/02/10 18:32:46
Done.
|
| + AtomicString initiatorType() const override; |
| + DOMHighResTimeStamp workerStart() const override; |
| + DOMHighResTimeStamp domainLookupStart() const override; |
| + DOMHighResTimeStamp domainLookupEnd() const override; |
| + DOMHighResTimeStamp connectStart() const override; |
| + DOMHighResTimeStamp connectEnd() const override; |
| + DOMHighResTimeStamp secureConnectionStart() const override; |
| + DOMHighResTimeStamp requestStart() const override; |
| + DOMHighResTimeStamp responseStart() const override; |
| + unsigned long long transferSize() const override; |
| + unsigned long long encodedBodySize() const override; |
| + unsigned long long decodedBodySize() const override; |
| + |
| + // PerformanceNavigationTiming's unique attributes. |
| DOMHighResTimeStamp unloadEventStart() const; |
| DOMHighResTimeStamp unloadEventEnd() const; |
| DOMHighResTimeStamp domInteractive() const; |
| @@ -60,29 +65,28 @@ class CORE_EXPORT PerformanceNavigationTiming final |
| DOMHighResTimeStamp redirectEnd() const override; |
| DOMHighResTimeStamp responseEnd() const override; |
| + DECLARE_VIRTUAL_TRACE(); |
| + |
| protected: |
| void buildJSONValue(V8ObjectBuilder&) const override; |
| private: |
| ~PerformanceNavigationTiming() override; |
| + static AtomicString getNavigationType(NavigationType, const Document*); |
| + |
| + const DocumentTiming* documentTiming() const; |
| + DocumentLoader* documentLoader() const; |
| + DocumentLoadTiming* documentLoadTiming() const; |
| + ExecutionContext* getExecutionContext() const; |
| + |
| + bool getAllowRedirectDetails() const; |
| + |
| + ResourceLoadTiming* resourceLoadTiming() const; |
| + |
| double m_timeOrigin; |
| - double m_unloadEventStart; |
| - double m_unloadEventEnd; |
| - double m_loadEventStart; |
| - double m_loadEventEnd; |
| - unsigned short m_redirectCount; |
| - double m_domInteractive; |
| - double m_domContentLoadedEventStart; |
| - double m_domContentLoadedEventEnd; |
| - double m_domComplete; |
| - NavigationType m_type; |
| - double m_redirectStart; |
| - double m_redirectEnd; |
| - double m_fetchStart; |
| - double m_responseEnd; |
| - bool m_allowRedirectDetails; |
| - bool m_hasSameOriginAsPreviousDocument; |
| + std::unique_ptr<ResourceTimingInfo> m_resourceTimingInfo; |
| + WeakMember<LocalFrame> m_frame; |
| }; |
| } // namespace blink |