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

Unified Diff: media/base/android/media_player_listener.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_listener.h
diff --git a/media/base/android/media_player_listener.h b/media/base/android/media_player_listener.h
index e88faae041878ead61fe6193c5c3fa169ab39573..e8f4d1c528de8e10d109055fa679f6f03ba2a225 100644
--- a/media/base/android/media_player_listener.h
+++ b/media/base/android/media_player_listener.h
@@ -40,9 +40,11 @@ class MediaPlayerListener {
void OnPlaybackComplete(JNIEnv* /* env */, jobject /* obj */);
void OnSeekComplete(JNIEnv* /* env */, jobject /* obj */);
void OnMediaPrepared(JNIEnv* /* env */, jobject /* obj */);
+ void OnMediaInterrupted(JNIEnv* /* env */, jobject /* obj */);
// Create a Java MediaPlayerListener object.
void CreateMediaPlayerListener(jobject context, jobject media_player);
+ void ReleaseMediaPlayerListenerResources();
// Register MediaPlayerListener in the system library loader.
static bool RegisterMediaPlayerListener(JNIEnv* env);
@@ -54,6 +56,8 @@ class MediaPlayerListener {
// The MediaPlayerBridge object all the callbacks should be send to.
base::WeakPtr<MediaPlayerBridge> media_player_;
+ base::android::ScopedJavaGlobalRef<jobject> j_media_player_listener_;
+
DISALLOW_COPY_AND_ASSIGN(MediaPlayerListener);
};

Powered by Google App Engine
This is Rietveld 408576698