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

Unified Diff: webkit/glue/webmediaplayer_impl.cc

Issue 6581012: Fix progress event not firing when load has completed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move change of state inside check for download completion. Created 9 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webmediaplayer_impl.cc
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc
index 075439d4930f8312f3302487e9f0fb145ca33015..8e1394452ea3f785659a839bd9aaafb17d5ecf62 100644
--- a/webkit/glue/webmediaplayer_impl.cc
+++ b/webkit/glue/webmediaplayer_impl.cc
@@ -825,8 +825,12 @@ void WebMediaPlayerImpl::OnNetworkEvent() {
// If we are inactive because we just finished receiving all the data,
// do one final repaint to show final progress.
if (bytesLoaded() == totalBytes() &&
- network_state_ != WebKit::WebMediaPlayer::Idle)
+ network_state_ != WebKit::WebMediaPlayer::Idle) {
Repaint();
+
+ SetNetworkState(WebKit::WebMediaPlayer::Loaded);
+ }
+
SetNetworkState(WebKit::WebMediaPlayer::Idle);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698