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

Unified Diff: third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp

Issue 2645803003: Move FirstMeaningfulPaintDetector timer to frame-specific TaskRunnerTimer (Closed)
Patch Set: Created 3 years, 11 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/FirstMeaningfulPaintDetector.cpp
diff --git a/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp b/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
index 84060c8fd96c6e3635bf8eaa26903c30eac48ff5..ef20ba40b423f1e70b6524abb523c4bc5ba40d41 100644
--- a/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
+++ b/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
@@ -5,6 +5,7 @@
#include "core/paint/FirstMeaningfulPaintDetector.h"
#include "core/css/FontFaceSet.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/fetch/ResourceFetcher.h"
#include "core/paint/PaintTiming.h"
#include "platform/instrumentation/tracing/TraceEvent.h"
@@ -29,9 +30,11 @@ FirstMeaningfulPaintDetector& FirstMeaningfulPaintDetector::from(
}
FirstMeaningfulPaintDetector::FirstMeaningfulPaintDetector(
- PaintTiming* paintTiming)
+ PaintTiming* paintTiming,
+ Document& document)
: m_paintTiming(paintTiming),
m_networkStableTimer(
+ TaskRunnerHelper::get(TaskType::UnspecedTimer, &document),
this,
&FirstMeaningfulPaintDetector::networkStableTimerFired) {}

Powered by Google App Engine
This is Rietveld 408576698