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

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

Issue 2411723002: Split MediaSessionStateChanged() and MediaSessionMetadataChanged() (Closed)
Patch Set: rebased and addressed Anton's comments 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/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 674728838d4c7781a32a7ab2893c5970e078514b..5f6c3fcb7fa1df04b2c8c1cb89a6cf8a05b163ce 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3849,8 +3849,13 @@ void WebContentsImpl::OnMediaSessionStateChanged() {
MediaSession* session = MediaSession::Get(this);
FOR_EACH_OBSERVER(WebContentsObserver, observers_,
MediaSessionStateChanged(session->IsControllable(),
- session->IsSuspended(),
- session->metadata()));
+ session->IsSuspended()));
+}
+
+void WebContentsImpl::OnMediaSessionMetadataChanged() {
+ MediaSession* session = MediaSession::Get(this);
+ FOR_EACH_OBSERVER(WebContentsObserver, observers_,
+ MediaSessionMetadataChanged(session->metadata()));
}
void WebContentsImpl::ResumeMediaSession() {

Powered by Google App Engine
This is Rietveld 408576698