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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2333983002: Reduce number of active codecs on low end devices. (Closed)
Patch Set: Fix windows. Created 4 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
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index c035e5ea7136976a2ce7510d04e116daf3b17973..e45cd648575e075f2ac993ac0199e9ca82227a3d 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -1579,13 +1579,7 @@ void WebMediaPlayerImpl::UpdatePlayState() {
}
void WebMediaPlayerImpl::SetDelegateState(DelegateState new_state) {
- if (!delegate_)
- return;
-
- // Dedupe state changes in the general case, but make an exception for gone
- // since the delegate will use that information to decide when the idle timer
- // should be fired.
- if (delegate_state_ == new_state && new_state != DelegateState::GONE)
+ if (!delegate_ || delegate_state_ == new_state)
return;
delegate_state_ = new_state;
« no previous file with comments | « content/renderer/media/renderer_webmediaplayer_delegate_browsertest.cc ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698