#include "third_party/blink/renderer/core/html/media/media_custom_controls_fullscreen_detector.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/public/platform/web_fullscreen_video_status.h"
#include "third_party/blink/renderer/core/dom/events/event.h"
#include "third_party/blink/renderer/core/fullscreen/fullscreen.h"
#include "third_party/blink/renderer/core/html/media/html_video_element.h"
#include "third_party/blink/renderer/core/intersection_observer/intersection_observer_entry.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
#include "ui/gfx/geometry/size_conversions.h"
namespace blink {
WebFullscreenVideoStatus;
namespace {
constexpr float kMostlyFillViewportIntersectionThreshold = …;
constexpr float kMinPossibleFullscreenIntersectionThreshold = …;
constexpr float kMaxAllowedVideoMarginRatio = …;
constexpr float kMaxAllowedPortionOfVideoOffScreen = …;
bool IsFullscreenVideoOfDifferentRatio(const gfx::Size& video_size,
const gfx::Size& viewport_size,
const gfx::Size& intersection_size) { … }
}
MediaCustomControlsFullscreenDetector::MediaCustomControlsFullscreenDetector(
HTMLVideoElement& video)
: … { … }
void MediaCustomControlsFullscreenDetector::Attach() { … }
void MediaCustomControlsFullscreenDetector::Detach() { … }
void MediaCustomControlsFullscreenDetector::Invoke(ExecutionContext* context,
Event* event) { … }
void MediaCustomControlsFullscreenDetector::ContextDestroyed() { … }
void MediaCustomControlsFullscreenDetector::ReportEffectivelyFullscreen(
bool effectively_fullscreen) { … }
void MediaCustomControlsFullscreenDetector::UpdateDominantAndFullscreenStatus(
bool is_dominant_visible_content,
bool is_effectively_fullscreen) { … }
void MediaCustomControlsFullscreenDetector::OnIntersectionChanged(
const HeapVector<Member<IntersectionObserverEntry>>& entries) { … }
void MediaCustomControlsFullscreenDetector::TriggerObservation() { … }
bool MediaCustomControlsFullscreenDetector::IsVideoOrParentFullscreen() { … }
void MediaCustomControlsFullscreenDetector::Trace(Visitor* visitor) const { … }
bool MediaCustomControlsFullscreenDetector::
IsFullscreenVideoOfDifferentRatioForTesting(
const gfx::Size& video_size,
const gfx::Size& viewport_size,
const gfx::Size& intersection_size) { … }
}