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

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: Added browser tests 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 32e2c0455d4181a0829f1b32fc0d003788607945..20443ea119902f61fcface60ae118a6e8e87bf82 100644
--- a/content/browser/media/android/browser_media_player_manager.cc
+++ b/content/browser/media/android/browser_media_player_manager.cc
@@ -233,6 +233,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)
@@ -529,7 +530,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)
mlamouri (slow - plz ping) 2015/06/18 16:43:22 When do you end up in that situation?
whywhat 2015/06/19 16:00:34 So it happens when I go to the notification and pa
mlamouri (slow - plz ping) 2015/06/22 14:34:17 Ok.
+ 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