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

Unified Diff: content/browser/android/web_contents_observer_proxy.cc

Issue 1458703003: Media Session API: use MediaMetadata in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_session_browser_side
Patch Set: nits Created 4 years, 9 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/android/web_contents_observer_proxy.cc
diff --git a/content/browser/android/web_contents_observer_proxy.cc b/content/browser/android/web_contents_observer_proxy.cc
index 0483fd867f004fed3c25d3b67068b8daeda52e99..dfa52cfb2112afb760c33379abdd1dc26136607c 100644
--- a/content/browser/android/web_contents_observer_proxy.cc
+++ b/content/browser/android/web_contents_observer_proxy.cc
@@ -11,6 +11,7 @@
#include "base/android/scoped_java_ref.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
+#include "content/common/android/media_metadata_android.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/navigation_handle.h"
@@ -307,14 +308,18 @@ void WebContentsObserverProxy::DidStartNavigationToPendingEntry(
env, obj.obj(), jstring_url.obj());
}
-void WebContentsObserverProxy::MediaSessionStateChanged(bool is_controllable,
- bool is_suspended) {
+void WebContentsObserverProxy::MediaSessionStateChanged(
+ bool is_controllable,
+ bool is_suspended,
+ const MediaMetadata& metadata) {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj(java_observer_);
+ ScopedJavaLocalRef<jobject> j_metadata =
+ MediaMetadataAndroid::CreateJavaObject(env, metadata);
Java_WebContentsObserverProxy_mediaSessionStateChanged(
- env, obj.obj(), is_controllable, is_suspended);
+ env, obj.obj(), is_controllable, is_suspended, j_metadata.obj());
}
void WebContentsObserverProxy::SetToBaseURLForDataURLIfNeeded(
« no previous file with comments | « content/browser/android/web_contents_observer_proxy.h ('k') | content/browser/media/session/media_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698