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

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: changed loadtimer to texttrackloadtimer 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..5af06f17469d9ca4ade4ff1dd829dd3ae7f6658b 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
@@ -280,6 +280,8 @@ protected:
virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; }
private:
+ class Task;
+
void resetMediaPlayerAndMediaSource();
bool alwaysCreateUserAgentShadowRoot() const final { return true; }
@@ -331,7 +333,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 +350,14 @@ private:
// loading
void invokeLoadAlgorithm();
void invokeResourceSelectionAlgorithm();
+ void continueResourceSelectionAlgorithm();
+ void enqueueMicrotask();
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 +468,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 +536,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;
@@ -582,6 +582,8 @@ private:
GC_PLUGIN_IGNORE("http://crbug.com/404577")
RawPtrWillBeWeakMember<AudioSourceProviderClient> m_audioSourceNode;
+ WeakPtr<Task> m_pendingTask; // owned by Microtask
+
// AudioClientImpl wraps an AudioSourceProviderClient.
// When the audio format is known, Chromium calls setFormat().
class AudioClientImpl final : public GarbageCollectedFinalized<AudioClientImpl>, public WebAudioSourceProviderClient {

Powered by Google App Engine
This is Rietveld 408576698