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

Unified Diff: content/renderer/render_view_impl.cc

Issue 11361239: Keep playing audio even when opening another tab, going to another app etc. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 | webkit/media/android/webmediaplayer_manager_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 6c4573fb75aecf16a14461ae0f5f84b162823718..0ade026dfaef2f68c0499a4a667794575b8c4eaf 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -5681,7 +5681,11 @@ void RenderViewImpl::OnWasHidden() {
#if defined(OS_ANDROID)
// Inform WebMediaPlayerManagerAndroid to release all media player resources.
- media_player_manager_->ReleaseMediaResources();
+ // unless some media is playing.
+ // If something is in progress the resource will not be freed, it will
+ // only be freed once the tab is destroyed or if the user navigates away
+ // via WebMediaPlayerAndroid::Destroy
+ media_player_manager_->ReleaseMediaResourcesIfNotPlaying();
#endif
if (webview()) {
« no previous file with comments | « no previous file | webkit/media/android/webmediaplayer_manager_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698