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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp

Issue 2627803002: Move 2 MediaControls Timers to 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
« no previous file with comments | « third_party/WebKit/Source/core/html/shadow/MediaControls.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/shadow/MediaControls.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
index 00344eb7e8067d9b4b2a7543a7234cb51cd85031..c3c805ef5069513969b4fb89f76fa9a40cd2f99c 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
@@ -29,6 +29,7 @@
#include "bindings/core/v8/ExceptionState.h"
#include "core/dom/ClientRect.h"
#include "core/dom/Fullscreen.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/events/MouseEvent.h"
#include "core/frame/Settings.h"
#include "core/html/HTMLMediaElement.h"
@@ -130,12 +131,16 @@ MediaControls::MediaControls(HTMLMediaElement& mediaElement)
this,
WTF::bind(&MediaControls::hideAllMenus, wrapWeakPersistent(this)))),
m_orientationLockDelegate(nullptr),
- m_hideMediaControlsTimer(this,
+ m_hideMediaControlsTimer(TaskRunnerHelper::get(TaskType::UnspecedTimer,
+ &mediaElement.document()),
+ this,
&MediaControls::hideMediaControlsTimerFired),
m_hideTimerBehaviorFlags(IgnoreNone),
m_isMouseOverControls(false),
m_isPausedForScrubbing(false),
- m_panelWidthChangedTimer(this,
+ m_panelWidthChangedTimer(TaskRunnerHelper::get(TaskType::UnspecedTimer,
+ &mediaElement.document()),
+ this,
&MediaControls::panelWidthChangedTimerFired),
m_panelWidth(0),
m_keepShowingUntilTimerFires(false) {}
« no previous file with comments | « third_party/WebKit/Source/core/html/shadow/MediaControls.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698