Index: content/browser/web_contents/web_contents_android.cc |
diff --git a/content/browser/web_contents/web_contents_android.cc b/content/browser/web_contents/web_contents_android.cc |
index 054aaffdaf89e1223c51cbe97b0bc4d8f44091b4..d2b2e987d41c6e0399dc8ea35cd94656f8114b26 100644 |
--- a/content/browser/web_contents/web_contents_android.cc |
+++ b/content/browser/web_contents/web_contents_android.cc |
@@ -21,6 +21,8 @@ |
#include "content/browser/frame_host/interstitial_page_impl.h" |
#include "content/browser/media/android/browser_media_player_manager.h" |
#include "content/browser/media/android/media_web_contents_observer_android.h" |
+#include "content/browser/media/session/media_session.h" |
+#include "content/browser/media/session/media_session_delegate_android.h" |
#include "content/browser/renderer_host/render_view_host_impl.h" |
#include "content/browser/web_contents/web_contents_impl.h" |
#include "content/common/devtools_messages.h" |
@@ -613,19 +615,12 @@ void WebContentsAndroid::RequestAccessibilitySnapshot( |
snapshot_callback); |
} |
-void WebContentsAndroid::ResumeMediaSession(JNIEnv* env, |
- const JavaParamRef<jobject>& obj) { |
- web_contents_->ResumeMediaSession(); |
-} |
- |
-void WebContentsAndroid::SuspendMediaSession(JNIEnv* env, |
- const JavaParamRef<jobject>& obj) { |
- web_contents_->SuspendMediaSession(); |
-} |
- |
-void WebContentsAndroid::StopMediaSession(JNIEnv* env, |
- const JavaParamRef<jobject>& obj) { |
- web_contents_->StopMediaSession(); |
+void WebContentsAndroid::AddMediaSessionDelegate( |
whywhat
2016/10/21 18:28:15
When is the delegate going to be removed?
Do you t
|
+ JNIEnv* env, |
+ const JavaParamRef<jobject>& obj, |
+ const JavaParamRef<jobject>& j_delegate) { |
+ MediaSessionDelegateAndroid::CreateAndConnect( |
+ MediaSession::Get(web_contents()), env, j_delegate); |
} |
ScopedJavaLocalRef<jstring> WebContentsAndroid::GetEncoding( |