#include "third_party/blink/renderer/core/html/media/video_wake_lock.h"
#include "base/task/single_thread_task_runner.h"
#include "third_party/blink/public/mojom/wake_lock/wake_lock.mojom-blink.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/events/event.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/picture_in_picture_controller.h"
#include "third_party/blink/renderer/core/geometry/dom_rect_read_only.h"
#include "third_party/blink/renderer/core/html/media/html_video_element.h"
#include "third_party/blink/renderer/core/html/media/remote_playback_controller.h"
#include "third_party/blink/renderer/core/intersection_observer/intersection_observer_entry.h"
#include "third_party/blink/renderer/core/page/page.h"
namespace blink {
namespace {
constexpr float kStrictVisibilityThreshold = …;
constexpr float kSizeThreshold = …;
Page* GetContainingPage(HTMLVideoElement& video) { … }
}
VideoWakeLock::VideoWakeLock(HTMLVideoElement& video)
: … { … }
void VideoWakeLock::ElementDidMoveToNewDocument() { … }
void VideoWakeLock::PageVisibilityChanged() { … }
void VideoWakeLock::OnVisibilityChanged(
const HeapVector<Member<IntersectionObserverEntry>>& entries) { … }
void VideoWakeLock::OnSizeChanged(
const HeapVector<Member<IntersectionObserverEntry>>& entries) { … }
void VideoWakeLock::Trace(Visitor* visitor) const { … }
void VideoWakeLock::Invoke(ExecutionContext*, Event* event) { … }
void VideoWakeLock::OnRemotePlaybackStateChanged(
mojom::blink::PresentationConnectionState state) { … }
void VideoWakeLock::ContextLifecycleStateChanged(mojom::FrameLifecycleState) { … }
void VideoWakeLock::ContextDestroyed() { … }
float VideoWakeLock::GetSizeThresholdForTests() const { … }
void VideoWakeLock::Update() { … }
bool VideoWakeLock::ShouldBeActive() const { … }
void VideoWakeLock::EnsureWakeLockService() { … }
void VideoWakeLock::OnConnectionError() { … }
void VideoWakeLock::UpdateWakeLockService() { … }
void VideoWakeLock::StartIntersectionObserver() { … }
}