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

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

Issue 2774543003: Fix PerformanceNavigationTiming accessor behavior after document detach. (Closed)
Patch Set: sync Created 3 years, 8 months 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PerformanceNavigationTiming_h 5 #ifndef PerformanceNavigationTiming_h
6 #define PerformanceNavigationTiming_h 6 #define PerformanceNavigationTiming_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/dom/ContextLifecycleObserver.h"
9 #include "core/dom/DOMHighResTimeStamp.h" 10 #include "core/dom/DOMHighResTimeStamp.h"
10 #include "core/loader/FrameLoaderTypes.h" 11 #include "core/loader/FrameLoaderTypes.h"
11 #include "core/timing/PerformanceResourceTiming.h" 12 #include "core/timing/PerformanceResourceTiming.h"
12 13
13 namespace blink { 14 namespace blink {
14 15
15 class Document; 16 class Document;
16 class DocumentTiming; 17 class DocumentTiming;
17 class DocumentLoader; 18 class DocumentLoader;
18 class DocumentLoadTiming; 19 class DocumentLoadTiming;
19 class LocalFrame; 20 class LocalFrame;
20 class ExecutionContext; 21 class ExecutionContext;
21 class ResourceTimingInfo; 22 class ResourceTimingInfo;
22 class ResourceLoadTiming; 23 class ResourceLoadTiming;
23 24
24 class CORE_EXPORT PerformanceNavigationTiming final 25 class CORE_EXPORT PerformanceNavigationTiming final
25 : public PerformanceResourceTiming { 26 : public PerformanceResourceTiming,
27 public ContextClient {
26 DEFINE_WRAPPERTYPEINFO(); 28 DEFINE_WRAPPERTYPEINFO();
29 USING_GARBAGE_COLLECTED_MIXIN(PerformanceNavigationTiming);
27 friend class PerformanceNavigationTimingTest; 30 friend class PerformanceNavigationTimingTest;
28 31
29 public: 32 public:
30 enum class NavigationType { Navigate, Reload, BackForward, Prerender }; 33 enum class NavigationType { Navigate, Reload, BackForward, Prerender };
31 34
32 PerformanceNavigationTiming(LocalFrame*, 35 PerformanceNavigationTiming(LocalFrame*,
33 ResourceTimingInfo*, 36 ResourceTimingInfo*,
34 double timeOrigin); 37 double timeOrigin);
35 38
36 // Attributes inheritted from PerformanceEntry. 39 // Attributes inheritted from PerformanceEntry.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 virtual bool allowTimingDetails() const; 75 virtual bool allowTimingDetails() const;
73 virtual bool didReuseConnection() const; 76 virtual bool didReuseConnection() const;
74 virtual unsigned long long getTransferSize() const; 77 virtual unsigned long long getTransferSize() const;
75 virtual unsigned long long getEncodedBodySize() const; 78 virtual unsigned long long getEncodedBodySize() const;
76 virtual unsigned long long getDecodedBodySize() const; 79 virtual unsigned long long getDecodedBodySize() const;
77 80
78 bool getAllowRedirectDetails() const; 81 bool getAllowRedirectDetails() const;
79 82
80 double m_timeOrigin; 83 double m_timeOrigin;
81 RefPtr<ResourceTimingInfo> m_resourceTimingInfo; 84 RefPtr<ResourceTimingInfo> m_resourceTimingInfo;
82 // TODO(sunjian): Investigate why not using a Member instead.
83 WeakMember<LocalFrame> m_frame;
84 }; 85 };
85 } // namespace blink 86 } // namespace blink
86 87
87 #endif // PerformanceNavigationTiming_h 88 #endif // PerformanceNavigationTiming_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698