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

Unified Diff: webkit/glue/webmediaplayer_impl.cc

Issue 174385: Fixes bug where changing the src of an audio/video element would stop firing events. (Closed)
Patch Set: Created 11 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
« 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 0438e54148facdc95a2a33612ad804663dc96e20..fdb7f2152837e7c6f9595be164f6a664f1c8f11e 100644
--- a/webkit/glue/webmediaplayer_impl.cc
+++ b/webkit/glue/webmediaplayer_impl.cc
@@ -542,19 +542,17 @@ void WebMediaPlayerImpl::OnPipelineError() {
void WebMediaPlayerImpl::SetNetworkState(
WebKit::WebMediaPlayer::NetworkState state) {
DCHECK(MessageLoop::current() == main_loop_);
- if (network_state_ != state) {
- network_state_ = state;
- GetClient()->networkStateChanged();
- }
+ // Always notify of any state change to ensure the client remains in sync.
+ network_state_ = state;
+ GetClient()->networkStateChanged();
}
void WebMediaPlayerImpl::SetReadyState(
WebKit::WebMediaPlayer::ReadyState state) {
DCHECK(MessageLoop::current() == main_loop_);
- if (ready_state_ != state) {
- ready_state_ = state;
- GetClient()->readyStateChanged();
- }
+ // Always notify of any state change to ensure the client remains in sync.
+ ready_state_ = state;
+ GetClient()->readyStateChanged();
}
void WebMediaPlayerImpl::Destroy() {
« 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