#include "remoting/host/resizing_host_observer.h"
#include <stdint.h>
#include <algorithm>
#include <list>
#include <utility>
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/time/default_tick_clock.h"
#include "base/time/tick_clock.h"
#include "remoting/base/logging.h"
#include "remoting/host/base/screen_resolution.h"
#include "remoting/host/desktop_display_info_monitor.h"
#include "remoting/host/desktop_resizer.h"
#include "remoting/proto/control.pb.h"
namespace remoting {
namespace {
const int kMinimumResizeIntervalMs = …;
class CandidateResolution { … };
}
ResizingHostObserver::ResizingHostObserver(
std::unique_ptr<DesktopResizer> desktop_resizer,
bool restore)
: … { … }
ResizingHostObserver::~ResizingHostObserver() { … }
void ResizingHostObserver::RegisterForDisplayChanges(
DesktopDisplayInfoMonitor& monitor) { … }
void ResizingHostObserver::SetScreenResolution(
const ScreenResolution& resolution,
std::optional<webrtc::ScreenId> opt_screen_id) { … }
void ResizingHostObserver::SetVideoLayout(
const protocol::VideoLayout& video_layout) { … }
void ResizingHostObserver::SetDisplayInfoForTesting(
const DesktopDisplayInfo& display_info) { … }
void ResizingHostObserver::SetClockForTesting(const base::TickClock* clock) { … }
void ResizingHostObserver::RestoreScreenResolution(webrtc::ScreenId screen_id) { … }
void ResizingHostObserver::RestoreAllScreenResolutions() { … }
void ResizingHostObserver::RecordOriginalResolution(
ScreenResolution resolution,
webrtc::ScreenId screen_id) { … }
void ResizingHostObserver::OnDisplayInfoChanged(
const DesktopDisplayInfo& display_info) { … }
}