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

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

Issue 1810513002: Media element resource selection algorithm should "await a stable state" Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use CancellableTaskFactory Created 4 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/html/HTMLMediaElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.h b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
index 2a0ec2e9f3a4f7dae2749d73f9c5738d08013f5e..ec98aaf0a7aa14c7458e7cec6adeaf2a8bbae13d 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
@@ -331,7 +331,7 @@ private:
void connectedToRemoteDevice() final;
void disconnectedFromRemoteDevice() final;
- void loadTimerFired(Timer<HTMLMediaElement>*);
+ void textTrackLoadTimerFired(Timer<HTMLMediaElement>*);
void progressEventTimerFired(Timer<HTMLMediaElement>*);
void playbackProgressTimerFired(Timer<HTMLMediaElement>*);
void startPlaybackProgressTimer();
@@ -348,13 +348,14 @@ private:
// loading
void invokeLoadAlgorithm();
void invokeResourceSelectionAlgorithm();
+ void continueResourceSelectionAlgorithm();
+ void enqueueMicrotaskForResourceSelectionAlgorithmContinuation();
void loadInternal();
void selectMediaResource();
void loadResource(const KURL&, ContentType&);
void startPlayerLoad();
void setPlayerPreload();
WebMediaPlayer::LoadType loadType() const;
- void scheduleNextSourceChild();
void loadNextSourceChild();
void clearMediaPlayer();
void clearMediaPlayerAndAudioSourceProviderClientWithoutLocking();
@@ -465,7 +466,7 @@ private:
void rejectPlayPromises();
void rejectPlayPromises(ExceptionCode, const String&);
- UnthrottledTimer<HTMLMediaElement> m_loadTimer;
+ UnthrottledTimer<HTMLMediaElement> m_textTrackLoadTimer;
UnthrottledTimer<HTMLMediaElement> m_progressEventTimer;
UnthrottledTimer<HTMLMediaElement> m_playbackProgressTimer;
UnthrottledTimer<HTMLMediaElement> m_audioTracksTimer;
@@ -533,9 +534,6 @@ private:
double m_fragmentEndTime;
- typedef unsigned PendingActionFlags;
- PendingActionFlags m_pendingActionFlags;
-
// FIXME: HTMLMediaElement has way too many state bits.
bool m_userGestureRequiredForPlay : 1;
bool m_playing : 1;
@@ -577,6 +575,8 @@ private:
OwnPtr<CancellableTaskFactory> m_playPromiseRejectTask;
ExceptionCode m_playPromiseErrorCode;
+ OwnPtr<CancellableTaskFactory> m_resourceSelectionAlgorithmContinuationTask;
+
// This is a weak reference, since m_audioSourceNode holds a reference to us.
// FIXME: Oilpan: Consider making this a strongly traced pointer with oilpan where strong cycles are not a problem.
GC_PLUGIN_IGNORE("http://crbug.com/404577")

Powered by Google App Engine
This is Rietveld 408576698