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

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: remove dependencies from other CLs Created 4 years, 10 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 4b5b388ce16f7e1b7c83e08f99d2fe1b999aafb8..afee749e3d52dc0b88d83f81b78b39d3b8ec3096 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_proxy.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/navigation_handle.h"
@@ -302,14 +303,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 =
+ MediaMetadataProxy::GetJavaObject(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(

Powered by Google App Engine
This is Rietveld 408576698