Chromium Code Reviews| 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 8831cf001626891686c020b39d8f5846f3b9cb68..1b16426b27accd1744c869842b9708f08007bf00 100644 |
| --- a/content/renderer/media/android/webmediaplayer_android.cc |
| +++ b/content/renderer/media/android/webmediaplayer_android.cc |
| @@ -1511,12 +1511,18 @@ void WebMediaPlayerAndroid::OnWaitingForDecryptionKey() { |
| encrypted_client_->didResumePlaybackBlockedForKey(); |
| } |
| -void WebMediaPlayerAndroid::OnHidden(bool must_suspend) { |
| +void WebMediaPlayerAndroid::OnHidden() { |
| if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| switches::kDisableMediaSuspend)) { |
| return; |
| } |
| + OnSuspendRequested(false); |
| +} |
| + |
| +void WebMediaPlayerAndroid::OnShown() {} |
| + |
| +void WebMediaPlayerAndroid::OnSuspendRequested(bool must_suspend) { |
| // If we're idle or playing video, pause and release resources; audio only |
| // players are allowed to continue playing in the background unless indicated |
|
sandersd (OOO until July 31)
2016/03/10 19:37:00
"background" isn't implicitly the correct word her
DaleCurtis
2016/03/10 23:11:36
Removed.
|
| // otherwise by the call. |
| @@ -1524,8 +1530,6 @@ void WebMediaPlayerAndroid::OnHidden(bool must_suspend) { |
| SuspendAndReleaseResources(); |
| } |
| -void WebMediaPlayerAndroid::OnShown() {} |
| - |
| void WebMediaPlayerAndroid::OnPlay() { |
| play(); |
| client_->playbackStateChanged(); |