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

Unified Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 564943002: Fix incorrect WebMediaPlayerDelegate notifications. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@psb
Patch Set: Created 6 years, 3 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 | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/android/webmediaplayer_android.cc
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index 048994912aa7377092e315f14cfd0e39924acb5b..46619e363b65cb41daaf058e8602d41577f94f80 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -1289,12 +1289,13 @@ void WebMediaPlayerAndroid::setPoster(const blink::WebURL& poster) {
}
void WebMediaPlayerAndroid::UpdatePlayingState(bool is_playing) {
+ const bool was_playing = is_playing_;
is_playing_ = is_playing;
if (!delegate_)
return;
- if (is_playing)
+ if (!was_playing && is_playing)
delegate_->DidPlay(this);
- else
+ else if (was_playing)
acolwell GONE FROM CHROMIUM 2014/09/11 19:23:25 nit: Don't you need && !is_playing_ here so you on
DaleCurtis 2014/09/11 19:28:01 Done.
delegate_->DidPause(this);
}
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698