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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2717263002: Convert m_deferredLoadTimer to Unthrottled frame-specific timer and include in didMoveToNewDocument. (Closed)
Patch Set: Add m_deferredLoadTimer as Unthrottled frame-specific timer and include in didMoveToNewDocument. Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index ee9fcef69378dead67b65cea6c7dc6d80c76c054..dbcde159d07024f811e771459bdca79d32a3d744 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -428,7 +428,10 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName,
m_defaultPlaybackStartPosition(0),
m_loadState(WaitingForSource),
m_deferredLoadState(NotDeferred),
- m_deferredLoadTimer(this, &HTMLMediaElement::deferredLoadTimerFired),
+ m_deferredLoadTimer(
+ TaskRunnerHelper::get(TaskType::Unthrottled, &document),
+ this,
+ &HTMLMediaElement::deferredLoadTimerFired),
m_webLayer(nullptr),
m_displayMode(Unknown),
m_officialPlaybackPosition(0),
@@ -517,6 +520,8 @@ void HTMLMediaElement::didMoveToNewDocument(Document& oldDocument) {
TaskRunnerHelper::get(TaskType::Unthrottled, &document()));
m_checkViewportIntersectionTimer.moveToNewTaskRunner(
TaskRunnerHelper::get(TaskType::Unthrottled, &document()));
+ m_deferredLoadTimer.moveToNewTaskRunner(
+ TaskRunnerHelper::get(TaskType::Unthrottled, &document()));
m_autoplayUmaHelper->didMoveToNewDocument(oldDocument);
// If any experiment is enabled, then we want to enable a user gesture by
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698