#include "services/device/generic_sensor/virtual_platform_sensor.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "services/device/public/cpp/generic_sensor/platform_sensor_configuration.h"
#include "services/device/public/cpp/generic_sensor/sensor_traits.h"
namespace device {
VirtualPlatformSensor::VirtualPlatformSensor(
mojom::SensorType type,
SensorReadingSharedBuffer* reading_buffer,
base::WeakPtr<PlatformSensorProvider> provider,
std::optional<SensorReading> pending_reading,
const mojom::VirtualSensorMetadata& metadata)
: … { … }
VirtualPlatformSensor::~VirtualPlatformSensor() = default;
void VirtualPlatformSensor::AddReading(const SensorReading& reading) { … }
void VirtualPlatformSensor::DoAddReadingSync(const SensorReading& reading) { … }
void VirtualPlatformSensor::SimulateSensorRemoval() { … }
bool VirtualPlatformSensor::StartSensor(
const PlatformSensorConfiguration& optimal_configuration) { … }
void VirtualPlatformSensor::StopSensor() { … }
mojom::ReportingMode VirtualPlatformSensor::GetReportingMode() { … }
PlatformSensorConfiguration VirtualPlatformSensor::GetDefaultConfiguration() { … }
bool VirtualPlatformSensor::CheckSensorConfiguration(
const PlatformSensorConfiguration& configuration) { … }
double VirtualPlatformSensor::GetMinimumSupportedFrequency() { … }
double VirtualPlatformSensor::GetMaximumSupportedFrequency() { … }
}