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

Unified Diff: webkit/media/android/webmediaplayer_in_process_android.cc

Issue 11348199: Free (and pause) audio resources when getting a phone call (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@input_color
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 | « webkit/media/android/webmediaplayer_in_process_android.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/android/webmediaplayer_in_process_android.cc
diff --git a/webkit/media/android/webmediaplayer_in_process_android.cc b/webkit/media/android/webmediaplayer_in_process_android.cc
index aea5a05805b06dfc1ce8fee83444f025ba284957..6f28a8bc7a29a8183a4a8a4716678d33d1aa0ce1 100644
--- a/webkit/media/android/webmediaplayer_in_process_android.cc
+++ b/webkit/media/android/webmediaplayer_in_process_android.cc
@@ -109,6 +109,10 @@ void WebMediaPlayerInProcessAndroid::SeekCompleteCallback(
OnSeekComplete(current_time);
}
+void WebMediaPlayerInProcessAndroid::MediaInterruptedCallback(int player_id) {
+ PauseInternal();
+}
+
void WebMediaPlayerInProcessAndroid::MediaErrorCallback(int player_id,
int error_type) {
OnMediaError(error_type);
@@ -148,6 +152,8 @@ void WebMediaPlayerInProcessAndroid::InitializeMediaPlayer(GURL url) {
base::Bind(&WebMediaPlayerInProcessAndroid::SeekCompleteCallback,
base::Unretained(this)),
base::Bind(&WebMediaPlayerInProcessAndroid::TimeUpdateCallback,
+ base::Unretained(this)),
+ base::Bind(&WebMediaPlayerInProcessAndroid::MediaInterruptedCallback,
base::Unretained(this))));
UpdateNetworkState(WebMediaPlayer::NetworkStateLoading);
« no previous file with comments | « webkit/media/android/webmediaplayer_in_process_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698