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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2441423002: Add MediaSessionObserver to allow clients observe MediaSession directly (Closed)
Patch Set: don't store session pointer in observer, remove StopObserving() 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
« no previous file with comments | « content/browser/media/session/pepper_playback_observer.cc ('k') | content/public/browser/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e877841175ef50af87b33a1d626c96fccf2179e9..5d93e9a1d2a21a9b54aa798b7a540c42ae7f5ba3 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -61,7 +61,7 @@
#include "content/browser/media/audio_stream_monitor.h"
#include "content/browser/media/capture/web_contents_audio_muter.h"
#include "content/browser/media/media_web_contents_observer.h"
-#include "content/browser/media/session/media_session.h"
+#include "content/browser/media/session/media_session_impl.h"
#include "content/browser/message_port_message_filter.h"
#include "content/browser/plugin_content_origin_whitelist.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
@@ -3804,7 +3804,7 @@ void WebContentsImpl::OnUpdateFaviconURL(
}
void WebContentsImpl::OnMediaSessionStateChanged() {
- MediaSession* session = MediaSession::Get(this);
+ MediaSessionImpl* session = MediaSessionImpl::Get(this);
for (auto& observer : observers_) {
observer.MediaSessionStateChanged(session->IsControllable(),
session->IsSuspended());
@@ -3812,22 +3812,22 @@ void WebContentsImpl::OnMediaSessionStateChanged() {
}
void WebContentsImpl::OnMediaSessionMetadataChanged() {
- MediaSession* session = MediaSession::Get(this);
+ MediaSessionImpl* session = MediaSessionImpl::Get(this);
for (auto& observer : observers_) {
observer.MediaSessionMetadataChanged(session->metadata());
}
}
void WebContentsImpl::ResumeMediaSession() {
- MediaSession::Get(this)->Resume(MediaSession::SuspendType::UI);
+ MediaSessionImpl::Get(this)->Resume(MediaSession::SuspendType::UI);
}
void WebContentsImpl::SuspendMediaSession() {
- MediaSession::Get(this)->Suspend(MediaSession::SuspendType::UI);
+ MediaSessionImpl::Get(this)->Suspend(MediaSession::SuspendType::UI);
}
void WebContentsImpl::StopMediaSession() {
- MediaSession::Get(this)->Stop(MediaSession::SuspendType::UI);
+ MediaSessionImpl::Get(this)->Stop(MediaSession::SuspendType::UI);
}
void WebContentsImpl::OnPasswordInputShownOnHttp() {
« no previous file with comments | « content/browser/media/session/pepper_playback_observer.cc ('k') | content/public/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698