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

Unified Diff: third_party/WebKit/Source/core/paint/PaintTiming.h

Issue 2039363003: FirstMeaningfulPaint UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ready for review Created 4 years, 5 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/paint/PaintTiming.h
diff --git a/third_party/WebKit/Source/core/paint/PaintTiming.h b/third_party/WebKit/Source/core/paint/PaintTiming.h
index f8e0aa24cb6146e995d55c0333173898088671ac..1fb622f7fdf5eeb15f543a4aea683189b0eff893 100644
--- a/third_party/WebKit/Source/core/paint/PaintTiming.h
+++ b/third_party/WebKit/Source/core/paint/PaintTiming.h
@@ -6,6 +6,7 @@
#define PaintTiming_h
#include "core/dom/Document.h"
+#include "core/paint/FirstMeaningfulPaintDetector.h"
#include "platform/Supplementable.h"
#include "platform/heap/Handle.h"
#include "wtf/Noncopyable.h"
@@ -39,6 +40,8 @@ public:
void markFirstTextPaint();
void markFirstImagePaint();
+ void setFirstMeaningfulPaint(double stamp);
+
// The getters below return monotonically-increasing seconds, or zero if the
// given paint event has not yet occurred. See the comments for
// monotonicallyIncreasingTime in wtf/CurrentTime.h for additional details.
@@ -58,6 +61,13 @@ public:
// firstImagePaint returns the first time that image content was painted.
double firstImagePaint() const { return m_firstImagePaint; }
+ // firstMeaningfulPaint returns the first time that page's primary content
+ // was painted.
+ double firstMeaningfulPaint() const { return m_firstMeaningfulPaint; }
+
+ Document* document() { return m_document.get(); }
+ FirstMeaningfulPaintDetector& firstMeaningfulPaintDetector() { return *m_fmpDetector; }
+
DECLARE_VIRTUAL_TRACE();
private:
@@ -81,8 +91,10 @@ private:
double m_firstTextPaint = 0.0;
double m_firstImagePaint = 0.0;
double m_firstContentfulPaint = 0.0;
+ double m_firstMeaningfulPaint = 0.0;
Member<Document> m_document;
+ Member<FirstMeaningfulPaintDetector> m_fmpDetector;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698