#ifndef UI_AURA_HOST_FRAME_RATE_THROTTLER_H_
#define UI_AURA_HOST_FRAME_RATE_THROTTLER_H_
#include "base/containers/flat_set.h"
#include "base/memory/raw_ptr.h"
#include "base/no_destructor.h"
#include "ui/aura/aura_export.h"
namespace aura {
class WindowTreeHost;
class AURA_EXPORT HostFrameRateThrottler {
public:
static HostFrameRateThrottler& GetInstance();
void AddHost(WindowTreeHost* host);
void RemoveHost(WindowTreeHost* host);
const base::flat_set<raw_ptr<WindowTreeHost, CtnExperimental>>& hosts()
const {
return hosts_;
}
private:
friend class base::NoDestructor<HostFrameRateThrottler>;
HostFrameRateThrottler();
~HostFrameRateThrottler();
void UpdateHostFrameSinkManager();
base::flat_set<raw_ptr<WindowTreeHost, CtnExperimental>> hosts_;
};
}
#endif