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

Unified Diff: content/browser/media/android/browser_media_player_manager.cc

Issue 1159113006: [Android] A prototype of the interactive media notification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed the comments Created 5 years, 6 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: content/browser/media/android/browser_media_player_manager.cc
diff --git a/content/browser/media/android/browser_media_player_manager.cc b/content/browser/media/android/browser_media_player_manager.cc
index acaab47b2b617c4576bd141b758ad4702e3de293..e93c51921b23274d5dbffff0aba7e7636e17e5b7 100644
--- a/content/browser/media/android/browser_media_player_manager.cc
+++ b/content/browser/media/android/browser_media_player_manager.cc
@@ -285,6 +285,7 @@ void BrowserMediaPlayerManager::OnMediaMetadataChanged(
void BrowserMediaPlayerManager::OnPlaybackComplete(int player_id) {
Send(new MediaPlayerMsg_MediaPlaybackCompleted(RoutingID(), player_id));
+
MediaSession::Get(web_contents())->RemovePlayer(this, player_id);
if (fullscreen_player_id_ == player_id)
@@ -581,7 +582,8 @@ void BrowserMediaPlayerManager::OnPause(
if (player)
player->Pause(is_media_related_action);
- MediaSession::Get(web_contents())->RemovePlayer(this, player_id);
+ if (is_media_related_action)
+ MediaSession::Get(web_contents())->RemovePlayer(this, player_id);
}
void BrowserMediaPlayerManager::OnSetVolume(int player_id, double volume) {

Powered by Google App Engine
This is Rietveld 408576698