#include "chrome/browser/picture_in_picture/picture_in_picture_bounds_cache.h"
#include "content/public/browser/web_contents.h"
#include "ui/display/display.h"
WEB_CONTENTS_USER_DATA_KEY_IMPL(PictureInPictureBoundsCache);
PictureInPictureBoundsCache::PictureInPictureBoundsCache(
content::WebContents* web_contents)
: … { … }
PictureInPictureBoundsCache::~PictureInPictureBoundsCache() = default;
std::optional<gfx::Rect> PictureInPictureBoundsCache::GetBoundsForNewWindow(
content::WebContents* web_contents,
const display::Display& display,
std::optional<gfx::Size> requested_content_size) { … }
void PictureInPictureBoundsCache::UpdateCachedBounds(
content::WebContents* web_contents,
const gfx::Rect& most_recent_bounds) { … }
std::optional<gfx::Rect> PictureInPictureBoundsCache::GetBoundsForNewWindow(
const display::Display& display,
const std::optional<gfx::Size>& requested_content_size) { … }
void PictureInPictureBoundsCache::UpdateCachedBounds(
const gfx::Rect& most_recent_bounds) { … }
void PictureInPictureBoundsCache::Clear() { … }