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

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

Issue 327553002: Transition networkState back to NETWORK_IDLE on fetch if preload=none (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: deferredLoad -> deferLoad. Created 6 years, 6 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: Source/core/html/HTMLMediaElement.h
diff --git a/Source/core/html/HTMLMediaElement.h b/Source/core/html/HTMLMediaElement.h
index 3bda86b84467989e361bb0f08f00516d1c77b77c..b26c95eecea1a0455548036b29b7c0d4d02942b2 100644
--- a/Source/core/html/HTMLMediaElement.h
+++ b/Source/core/html/HTMLMediaElement.h
@@ -364,7 +364,6 @@ private:
void loadResource(const KURL&, ContentType&, const String& keySystem);
void startPlayerLoad();
void setPlayerPreload();
- void startDelayedLoad();
blink::WebMediaPlayer::LoadType loadType() const;
void scheduleNextSourceChild();
void loadNextSourceChild();
@@ -382,6 +381,14 @@ private:
void mediaLoadingFailed(MediaPlayer::NetworkState);
+ // deferred loading (preload=none)
+ bool loadIsDeferred() const;
+ void deferLoad();
+ void cancelDeferredLoad();
+ void startDeferredLoad();
+ void executeDeferredLoad();
+ void deferredLoadTimerFired(Timer<HTMLMediaElement>*);
+
void updateActiveTextTrackCues(double);
HTMLTrackElement* showingTrackWithSameKind(HTMLTrackElement*) const;
@@ -461,6 +468,22 @@ private:
RefPtrWillBeMember<HTMLSourceElement> m_currentSourceNode;
RefPtrWillBeMember<Node> m_nextChildNodeToConsider;
+ // "Deferred loading" state (for preload=none).
+ enum DeferredLoadState {
+ // The load is not deferred.
+ NotDeferred,
+ // The load is deferred, and waiting for the task to set the
+ // delaying-the-load-event flag (to false).
+ WaitingForStopDelayingLoadEventTask,
+ // The load is the deferred, and waiting for a triggering event.
+ WaitingForTrigger,
+ // The load is deferred, and waiting for the task to set the
+ // delaying-the-load-event flag, after which the load will be executed.
+ ExecuteOnStopDelayingLoadEventTask
+ };
+ DeferredLoadState m_deferredLoadState;
+ Timer<HTMLMediaElement> m_deferredLoadTimer;
+
OwnPtr<MediaPlayer> m_player;
blink::WebLayer* m_webLayer;
« no previous file with comments | « LayoutTests/media/video-preload-none-no-stalled-event-expected.txt ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698