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

Unified Diff: third_party/WebKit/Source/core/timing/PerformanceBase.h

Issue 2647643004: Report nav timing 2 instance as soon as it's requested. (Closed)
Patch Set: add TODO Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/timing/PerformanceBase.h
diff --git a/third_party/WebKit/Source/core/timing/PerformanceBase.h b/third_party/WebKit/Source/core/timing/PerformanceBase.h
index a5521b09c3fb1ba59c9d4a597f8f2f1f1aadb961..dc1f0aa1774024a4feb8dc2d1fb5ac3542ec7b25 100644
--- a/third_party/WebKit/Source/core/timing/PerformanceBase.h
+++ b/third_party/WebKit/Source/core/timing/PerformanceBase.h
@@ -49,7 +49,6 @@
namespace blink {
class ExceptionState;
-class LocalFrame;
class PerformanceObserver;
class PerformanceTiming;
class ResourceResponse;
@@ -61,7 +60,6 @@ using PerformanceEntryVector = HeapVector<Member<PerformanceEntry>>;
using PerformanceObservers = HeapListHashSet<Member<PerformanceObserver>>;
class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData {
- friend class PerformanceBaseTest;
public:
~PerformanceBase() override;
@@ -89,7 +87,7 @@ class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData {
double timeOrigin() const { return m_timeOrigin; }
- PerformanceEntryVector getEntries() const;
+ PerformanceEntryVector getEntries();
PerformanceEntryVector getEntriesByType(const String& entryType);
PerformanceEntryVector getEntriesByName(const String& name,
const String& entryType);
@@ -113,7 +111,7 @@ class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData {
void addResourceTiming(const ResourceTimingInfo&);
- void addNavigationTiming(LocalFrame*);
+ void notifyNavigationTimingToObservers();
void addFirstPaintTiming(double startTime);
@@ -134,18 +132,18 @@ class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData {
void activateObserver(PerformanceObserver&);
void resumeSuspendedObservers();
- DECLARE_VIRTUAL_TRACE();
+ static bool allowsTimingRedirect(const Vector<ResourceResponse>&,
+ const ResourceResponse&,
+ const SecurityOrigin&,
+ ExecutionContext*);
- private:
static PerformanceNavigationTiming::NavigationType getNavigationType(
NavigationType,
const Document*);
- static bool allowsTimingRedirect(const Vector<ResourceResponse>&,
- const ResourceResponse&,
- const SecurityOrigin&,
- ExecutionContext*);
+ DECLARE_VIRTUAL_TRACE();
+ private:
static bool passesTimingAllowCheck(const ResourceResponse&,
const SecurityOrigin&,
const AtomicString&,
@@ -156,6 +154,12 @@ class CORE_EXPORT PerformanceBase : public EventTargetWithInlineData {
protected:
explicit PerformanceBase(double timeOrigin, RefPtr<WebTaskRunner>);
+ // Expect Performance to override this method,
+ // WorkerPerformance doesn't have to override this.
+ virtual PerformanceNavigationTiming* createNavigationTimingInstance() {
+ return nullptr;
+ }
+
bool isResourceTimingBufferFull();
void addResourceTimingBuffer(PerformanceEntry&);
« no previous file with comments | « third_party/WebKit/Source/core/timing/Performance.cpp ('k') | third_party/WebKit/Source/core/timing/PerformanceBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698