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

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: Rebase and microtask changes Created 4 years, 4 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 c93644fe324f57e830dbdf6db11fb05a130e4b37..cae35ea7bc4350de140f40e8fd1eb3e6b2d454f8 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
@@ -352,7 +352,7 @@ private:
void cancelledRemotePlaybackRequest() final;
void requestReload(const WebURL&) final;
- void loadTimerFired(TimerBase*);
+ void textTrackLoadTimerFired(TimerBase*);
void progressEventTimerFired(TimerBase*);
void playbackProgressTimerFired(TimerBase*);
void startPlaybackProgressTimer();
@@ -369,6 +369,7 @@ private:
// loading
void invokeLoadAlgorithm();
void invokeResourceSelectionAlgorithm();
+ void continueResourceSelectionAlgorithm();
void loadInternal();
void selectMediaResource();
void loadResource(const WebMediaPlayerSource&, const ContentType&);
@@ -379,6 +380,7 @@ private:
void loadSourceFromObject();
void loadSourceFromAttribute();
void loadNextSourceChild();
+ void loadNextSourceChildAfterError();
void clearMediaPlayer();
void clearMediaPlayerAndAudioSourceProviderClientWithoutLocking();
bool havePotentialSourceChild();
@@ -495,7 +497,7 @@ private:
void onVisibilityChangedForAutoplay(bool isVisible);
- UnthrottledThreadTimer<HTMLMediaElement> m_loadTimer;
+ UnthrottledThreadTimer<HTMLMediaElement> m_textTrackLoadTimer;
UnthrottledThreadTimer<HTMLMediaElement> m_progressEventTimer;
UnthrottledThreadTimer<HTMLMediaElement> m_playbackProgressTimer;
UnthrottledThreadTimer<HTMLMediaElement> m_audioTracksTimer;
@@ -564,9 +566,6 @@ private:
double m_fragmentEndTime;
- typedef unsigned PendingActionFlags;
- PendingActionFlags m_pendingActionFlags;
-
// FIXME: HTMLMediaElement has way too many state bits.
bool m_lockedPendingUserGesture : 1;
bool m_playing : 1;
@@ -606,6 +605,9 @@ private:
HeapVector<Member<ScriptPromiseResolver>> m_playPromiseRejectList;
ExceptionCode m_playPromiseErrorCode;
+ std::unique_ptr<CancellableTaskFactory> m_resourceSelectionAlgorithmContinuationTask;
+ std::unique_ptr<CancellableTaskFactory> m_loadNextSourceChildAfterErrorTask;
+
// This is a weak reference, since m_audioSourceNode holds a reference to us.
// TODO(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