#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/viz/service/frame_sinks/video_detector.h"
#include <memory>
#include <utility>
#include <vector>
#include "base/task/sequenced_task_runner.h"
#include "base/time/time.h"
#include "components/viz/common/features.h"
#include "components/viz/common/quads/compositor_frame.h"
#include "components/viz/common/quads/draw_quad.h"
#include "components/viz/common/quads/texture_draw_quad.h"
#include "components/viz/service/surfaces/surface.h"
#include "components/viz/service/surfaces/surface_manager.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_conversions.h"
namespace viz {
constexpr base::TimeDelta VideoDetector::kMaxVideoTimeout;
constexpr base::TimeDelta VideoDetector::kMinVideoTimeout;
constexpr base::TimeDelta VideoDetector::kMinVideoDuration;
class VideoDetector::ClientInfo { … };
VideoDetector::VideoDetector(
const std::vector<FrameSinkId>& registered_frame_sink_ids,
SurfaceManager* surface_manager,
const base::TickClock* tick_clock,
scoped_refptr<base::SequencedTaskRunner> task_runner)
: … { … }
VideoDetector::~VideoDetector() { … }
void VideoDetector::OnVideoActivityEnded() { … }
void VideoDetector::AddObserver(
mojo::PendingRemote<mojom::VideoDetectorObserver> pending_observer) { … }
void VideoDetector::OnFrameSinkIdRegistered(const FrameSinkId& frame_sink_id) { … }
void VideoDetector::OnFrameSinkIdInvalidated(const FrameSinkId& frame_sink_id) { … }
bool VideoDetector::OnSurfaceDamaged(const SurfaceId& surface_id,
const BeginFrameAck& ack,
HandleInteraction handle_interaction) { … }
void VideoDetector::OnSurfaceWillBeDrawn(Surface* surface) { … }
}