#include "chrome/browser/ui/global_media_controls/presentation_request_notification_item.h"
#include "base/unguessable_token.h"
#include "components/favicon/content/content_favicon_driver.h"
#include "components/favicon/core/favicon_driver.h"
#include "components/global_media_controls/public/constants.h"
#include "components/global_media_controls/public/media_item_manager.h"
#include "components/media_message_center/media_notification_util.h"
#include "components/media_router/browser/presentation/presentation_service_delegate_impl.h"
#include "content/public/browser/media_session.h"
#include "services/media_session/public/cpp/media_image_manager.h"
#include "services/media_session/public/cpp/media_metadata.h"
#include "ui/gfx/image/image_skia.h"
namespace {
content::MediaSession* g_media_session_for_test = …;
content::WebContents* GetWebContentsFromPresentationRequest(
const content::PresentationRequest& request) { … }
std::optional<gfx::ImageSkia> GetCorrectColorTypeImage(const SkBitmap& bitmap) { … }
content::MediaSession* GetMediaSession(content::WebContents* web_contents) { … }
}
PresentationRequestNotificationItem::PresentationRequestNotificationItem(
const content::PresentationRequest& request,
std::unique_ptr<media_router::StartPresentationContext> context,
const mojo::Remote<global_media_controls::mojom::DevicePickerProvider>&
provider)
: … { … }
PresentationRequestNotificationItem::~PresentationRequestNotificationItem() { … }
void PresentationRequestNotificationItem::MediaSessionMetadataChanged(
const std::optional<media_session::MediaMetadata>& metadata) { … }
void PresentationRequestNotificationItem::MediaSessionImagesChanged(
const base::flat_map<media_session::mojom::MediaSessionImageType,
std::vector<media_session::MediaImage>>& images) { … }
void PresentationRequestNotificationItem::SetMediaSessionForTest(
content::MediaSession* media_session) { … }
void PresentationRequestNotificationItem::UpdatePickerWithMetadata() { … }
void PresentationRequestNotificationItem::UpdatePickerWithImages() { … }
void PresentationRequestNotificationItem::OnArtworkBitmap(
const SkBitmap& bitmap) { … }
void PresentationRequestNotificationItem::OnFaviconBitmap(
const SkBitmap& bitmap) { … }