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

Side by Side Diff: content/browser/web_contents/web_contents_impl.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, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 3743 matching lines...) Expand 10 before | Expand all | Expand 10 after
3754 return; 3754 return;
3755 3755
3756 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3756 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3757 DidUpdateFaviconURL(candidates)); 3757 DidUpdateFaviconURL(candidates));
3758 } 3758 }
3759 3759
3760 void WebContentsImpl::OnMediaSessionStateChanged() { 3760 void WebContentsImpl::OnMediaSessionStateChanged() {
3761 MediaSession* session = MediaSession::Get(this); 3761 MediaSession* session = MediaSession::Get(this);
3762 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3762 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3763 MediaSessionStateChanged(session->IsControllable(), 3763 MediaSessionStateChanged(session->IsControllable(),
3764 session->IsSuspended(), 3764 session->IsSuspended()));
3765 session->metadata()));
3766 } 3765 }
3767 3766
3768 void WebContentsImpl::ResumeMediaSession() { 3767 void WebContentsImpl::ResumeMediaSession() {
3769 MediaSession::Get(this)->Resume(MediaSession::SuspendType::UI); 3768 MediaSession::Get(this)->Resume(MediaSession::SuspendType::UI);
3770 } 3769 }
3771 3770
3772 void WebContentsImpl::SuspendMediaSession() { 3771 void WebContentsImpl::SuspendMediaSession() {
3773 MediaSession::Get(this)->Suspend(MediaSession::SuspendType::UI); 3772 MediaSession::Get(this)->Suspend(MediaSession::SuspendType::UI);
3774 } 3773 }
3775 3774
3776 void WebContentsImpl::StopMediaSession() { 3775 void WebContentsImpl::StopMediaSession() {
3777 MediaSession::Get(this)->Stop(MediaSession::SuspendType::UI); 3776 MediaSession::Get(this)->Stop(MediaSession::SuspendType::UI);
3778 } 3777 }
3779 3778
3779 void WebContentsImpl::OnMediaMetadataChanged() {
3780 MediaSession* session = MediaSession::Get(this);
3781 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3782 MediaMetadataChanged(session->metadata()));
3783 }
3784
3780 void WebContentsImpl::OnFirstVisuallyNonEmptyPaint() { 3785 void WebContentsImpl::OnFirstVisuallyNonEmptyPaint() {
3781 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3786 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3782 DidFirstVisuallyNonEmptyPaint()); 3787 DidFirstVisuallyNonEmptyPaint());
3783 3788
3784 did_first_visually_non_empty_paint_ = true; 3789 did_first_visually_non_empty_paint_ = true;
3785 3790
3786 if (theme_color_ != last_sent_theme_color_) { 3791 if (theme_color_ != last_sent_theme_color_) {
3787 // Theme color should have updated by now if there was one. 3792 // Theme color should have updated by now if there was one.
3788 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3793 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3789 DidChangeThemeColor(theme_color_)); 3794 DidChangeThemeColor(theme_color_));
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
5062 for (RenderViewHost* render_view_host : render_view_host_set) 5067 for (RenderViewHost* render_view_host : render_view_host_set)
5063 render_view_host->OnWebkitPreferencesChanged(); 5068 render_view_host->OnWebkitPreferencesChanged();
5064 } 5069 }
5065 5070
5066 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 5071 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
5067 JavaScriptDialogManager* dialog_manager) { 5072 JavaScriptDialogManager* dialog_manager) {
5068 dialog_manager_ = dialog_manager; 5073 dialog_manager_ = dialog_manager;
5069 } 5074 }
5070 5075
5071 } // namespace content 5076 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698