#include "services/device/compute_pressure/probes_manager.h"
#include "base/time/time.h"
#include "components/system_cpu/cpu_probe.h"
#include "services/device/compute_pressure/cpu_probe_manager.h"
#include "services/device/public/mojom/pressure_manager.mojom.h"
#include "services/device/public/mojom/pressure_update.mojom.h"
namespace device {
ProbesManager::ProbesManager(base::TimeDelta sampling_interval)
: … { … }
ProbesManager::~ProbesManager() = default;
bool ProbesManager::is_supported(mojom::PressureSource source) const { … }
void ProbesManager::RegisterClientRemote(
mojo::Remote<mojom::PressureClient> client,
mojom::PressureSource source) { … }
base::TimeDelta ProbesManager::sampling_interval() const { … }
void ProbesManager::UpdateClients(mojom::PressureSource source,
mojom::PressureState state) { … }
void ProbesManager::OnClientRemoteDisconnected(
mojom::PressureSource source,
mojo::RemoteSetElementId ) { … }
CpuProbeManager* ProbesManager::cpu_probe_manager() const { … }
void ProbesManager::set_cpu_probe_manager(
std::unique_ptr<CpuProbeManager> cpu_probe_manager) { … }
const base::RepeatingCallback<void(mojom::PressureState)>&
ProbesManager::cpu_probe_sampling_callback() const { … }
}