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

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

Issue 2015433003: Implement MediaMetadata artwork in content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed tests Created 4 years, 7 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 dfa52cfb2112afb760c33379abdd1dc26136607c..3086165b983b353ce47da90b7907d2758467324c 100644
--- a/content/browser/android/web_contents_observer_proxy.cc
+++ b/content/browser/android/web_contents_observer_proxy.cc
@@ -310,16 +310,25 @@ void WebContentsObserverProxy::DidStartNavigationToPendingEntry(
void WebContentsObserverProxy::MediaSessionStateChanged(
bool is_controllable,
- bool is_suspended,
- const MediaMetadata& metadata) {
+ bool is_suspended) {
+ JNIEnv* env = AttachCurrentThread();
+
+ ScopedJavaLocalRef<jobject> obj(java_observer_);
+
+ Java_WebContentsObserverProxy_mediaSessionStateChanged(
+ env, obj.obj(), is_controllable, is_suspended);
+}
+
+void WebContentsObserverProxy::MediaMetadataChanged(
+ 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, j_metadata.obj());
+ Java_WebContentsObserverProxy_mediaMetadataChanged(
+ env, obj.obj(), j_metadata.obj());
}
void WebContentsObserverProxy::SetToBaseURLForDataURLIfNeeded(

Powered by Google App Engine
This is Rietveld 408576698