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

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

Issue 2439483003: Link MediaSessionTabHelper with native MediaSession [CL is going to be split] (Closed)
Patch Set: Don't review, this CL is getting huge and needs to be split Created 4 years, 2 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 e42d6bd0b5c44cb483da5c5711afdae038a83421..c46bad2dd84878d12448504a13099bc09149eda1 100644
--- a/content/browser/android/web_contents_observer_proxy.cc
+++ b/content/browser/android/web_contents_observer_proxy.cc
@@ -12,11 +12,9 @@
#include "base/optional.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"
-#include "content/public/common/media_metadata.h"
#include "jni/WebContentsObserverProxy_jni.h"
using base::android::AttachCurrentThread;
@@ -318,30 +316,6 @@ void WebContentsObserverProxy::DidStartNavigationToPendingEntry(
jstring_url);
}
-void WebContentsObserverProxy::MediaSessionStateChanged(bool is_controllable,
- bool is_suspended) {
- JNIEnv* env = AttachCurrentThread();
-
- ScopedJavaLocalRef<jobject> obj(java_observer_);
-
- Java_WebContentsObserverProxy_mediaSessionStateChanged(
- env, obj, is_controllable, is_suspended);
-}
-
-void WebContentsObserverProxy::MediaSessionMetadataChanged(
- const base::Optional<MediaMetadata>& metadata) {
- JNIEnv* env = AttachCurrentThread();
-
- ScopedJavaLocalRef<jobject> obj(java_observer_);
- ScopedJavaLocalRef<jobject> j_metadata;
-
- if (metadata.has_value())
- j_metadata = MediaMetadataAndroid::CreateJavaObject(env, metadata.value());
-
- Java_WebContentsObserverProxy_mediaSessionMetadataChanged(env, obj,
- j_metadata);
-}
-
void WebContentsObserverProxy::SetToBaseURLForDataURLIfNeeded(
std::string* url) {
NavigationEntry* entry =
« 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