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

Unified Diff: media/base/android/media_player_bridge.h

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
Index: media/base/android/media_player_bridge.h
diff --git a/media/base/android/media_player_bridge.h b/media/base/android/media_player_bridge.h
index 820707f2534b767ccf128e611e5443e0286a1ec0..bb3a655897eb1b0fb140081e84608b594c3a816c 100644
--- a/media/base/android/media_player_bridge.h
+++ b/media/base/android/media_player_bridge.h
@@ -56,6 +56,9 @@ class MEDIA_EXPORT MediaPlayerBridge {
// Callbacks when seek completed. Args: player ID, current time.
typedef base::Callback<void(int, base::TimeDelta)> SeekCompleteCB;
+ // Callbacks when seek completed. Args: player ID
+ typedef base::Callback<void(int)> MediaInterruptedCB;
+
// Callbacks when playback completed. Args: player ID.
typedef base::Callback<void(int)> PlaybackCompleteCB;
@@ -82,7 +85,8 @@ class MEDIA_EXPORT MediaPlayerBridge {
const MediaPreparedCB& media_prepared_cb,
const PlaybackCompleteCB& playback_complete_cb,
const SeekCompleteCB& seek_complete_cb,
- const TimeUpdateCB& time_update_cb);
+ const TimeUpdateCB& time_update_cb,
+ const MediaInterruptedCB& media_interrupted_cb);
~MediaPlayerBridge();
typedef std::map<std::string, std::string> HeadersMap;
@@ -127,6 +131,7 @@ class MEDIA_EXPORT MediaPlayerBridge {
void OnPlaybackComplete();
void OnSeekComplete();
void OnMediaPrepared();
+ void OnMediaInterrupted();
// Prepare the player for playback, asynchronously. When succeeds,
// OnMediaPrepared() will be called. Otherwise, OnMediaError() will
@@ -158,6 +163,7 @@ class MEDIA_EXPORT MediaPlayerBridge {
MediaPreparedCB media_prepared_cb_;
PlaybackCompleteCB playback_complete_cb_;
SeekCompleteCB seek_complete_cb_;
+ MediaInterruptedCB media_interrupted_cb_;
// Callbacks when timer events are received.
TimeUpdateCB time_update_cb_;

Powered by Google App Engine
This is Rietveld 408576698