| Index: content/browser/web_contents/web_contents_impl.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
| index d1a5260ed8d53fe55cd41c6fe4a1c3374ea967dc..a815b0da3de1d7c5ef8c9dfb913d3aa6d1229e86 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -115,6 +115,7 @@
|
| #include "content/browser/android/content_video_view.h"
|
| #include "content/browser/android/date_time_chooser_android.h"
|
| #include "content/browser/android/media_players_observer.h"
|
| +#include "content/browser/media/android/media_session.h"
|
| #include "content/browser/web_contents/web_contents_android.h"
|
| #endif
|
|
|
| @@ -3265,6 +3266,33 @@ void WebContentsImpl::OnMediaPausedNotification(int64 player_cookie) {
|
| FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaPaused());
|
| }
|
|
|
| +void WebContentsImpl::OnMediaSessionStateChanged() {
|
| +#if defined(OS_ANDROID)
|
| + MediaSession* session = MediaSession::Get(this);
|
| + FOR_EACH_OBSERVER(WebContentsObserver, observers_,
|
| + MediaSessionStateChanged(session->IsControllable(),
|
| + session->IsSuspended()));
|
| +#else
|
| + NOTIMPLEMENTED();
|
| +#endif
|
| +}
|
| +
|
| +void WebContentsImpl::ResumeMediaSession() {
|
| +#if defined(OS_ANDROID)
|
| + MediaSession::Get(this)->Resume();
|
| +#else
|
| + NOTIMPLEMENTED();
|
| +#endif
|
| +}
|
| +
|
| +void WebContentsImpl::SuspendMediaSession() {
|
| +#if defined(OS_ANDROID)
|
| + MediaSession::Get(this)->Suspend();
|
| +#else
|
| + NOTIMPLEMENTED();
|
| +#endif
|
| +}
|
| +
|
| void WebContentsImpl::OnFirstVisuallyNonEmptyPaint() {
|
| FOR_EACH_OBSERVER(WebContentsObserver, observers_,
|
| DidFirstVisuallyNonEmptyPaint());
|
|
|