#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "services/device/public/mojom/sensor.mojom.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "services/device/public/mojom/sensor.mojom-params-data.h"
#include "services/device/public/mojom/sensor.mojom-shared-message-ids.h"
#include "services/device/public/mojom/sensor.mojom-import-headers.h"
#include "services/device/public/mojom/sensor.mojom-test-utils.h"
namespace device::mojom {
SensorReadingRaw::SensorReadingRaw()
: … { … }
SensorReadingRaw::SensorReadingRaw(
double timestamp_in,
std::vector<double> values_in)
: … { … }
SensorReadingRaw::~SensorReadingRaw() = default;
void SensorReadingRaw::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SensorReadingRaw::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SensorConfiguration::SensorConfiguration()
: … { … }
SensorConfiguration::SensorConfiguration(
double frequency_in)
: … { … }
SensorConfiguration::~SensorConfiguration() = default;
void SensorConfiguration::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SensorConfiguration::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char Sensor::Name_[] = …;
Sensor::IPCStableHashFunction Sensor::MessageToMethodInfo_(mojo::Message& message) { … }
const char* Sensor::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t Sensor::GetDefaultConfiguration_Sym::IPCStableHash() { … }
uint32_t Sensor::AddConfiguration_Sym::IPCStableHash() { … }
uint32_t Sensor::RemoveConfiguration_Sym::IPCStableHash() { … }
uint32_t Sensor::Suspend_Sym::IPCStableHash() { … }
uint32_t Sensor::Resume_Sym::IPCStableHash() { … }
uint32_t Sensor::ConfigureReadingChangeNotifications_Sym::IPCStableHash() { … }
# endif
class Sensor_GetDefaultConfiguration_ForwardToCallback
: public mojo::MessageReceiver { … };
class Sensor_AddConfiguration_ForwardToCallback
: public mojo::MessageReceiver { … };
SensorProxy::SensorProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void SensorProxy::GetDefaultConfiguration(
GetDefaultConfigurationCallback callback) { … }
void SensorProxy::AddConfiguration(
const ::device::PlatformSensorConfiguration& in_configuration, AddConfigurationCallback callback) { … }
void SensorProxy::RemoveConfiguration(
const ::device::PlatformSensorConfiguration& in_configuration) { … }
void SensorProxy::Suspend(
) { … }
void SensorProxy::Resume(
) { … }
void SensorProxy::ConfigureReadingChangeNotifications(
bool in_enabled) { … }
class Sensor_GetDefaultConfiguration_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Sensor_GetDefaultConfiguration_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Sensor_GetDefaultConfiguration_ProxyToResponder::Run(
const ::device::PlatformSensorConfiguration& in_configuration) { … }
class Sensor_AddConfiguration_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool Sensor_AddConfiguration_ForwardToCallback::Accept(
mojo::Message* message) { … }
void Sensor_AddConfiguration_ProxyToResponder::Run(
bool in_success) { … }
bool SensorStubDispatch::Accept(
Sensor* impl,
mojo::Message* message) { … }
bool SensorStubDispatch::AcceptWithResponder(
Sensor* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kSensorValidationInfo[] = …;
bool SensorRequestValidator::Accept(mojo::Message* message) { … }
bool SensorResponseValidator::Accept(mojo::Message* message) { … }
const char SensorClient::Name_[] = …;
SensorClient::IPCStableHashFunction SensorClient::MessageToMethodInfo_(mojo::Message& message) { … }
const char* SensorClient::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t SensorClient::RaiseError_Sym::IPCStableHash() { … }
uint32_t SensorClient::SensorReadingChanged_Sym::IPCStableHash() { … }
# endif
SensorClientProxy::SensorClientProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void SensorClientProxy::RaiseError(
) { … }
void SensorClientProxy::SensorReadingChanged(
) { … }
bool SensorClientStubDispatch::Accept(
SensorClient* impl,
mojo::Message* message) { … }
bool SensorClientStubDispatch::AcceptWithResponder(
SensorClient* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kSensorClientValidationInfo[] = …;
bool SensorClientRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::device::mojom::SensorReadingRaw::DataView, ::device::mojom::SensorReadingRawPtr>::Read(
::device::mojom::SensorReadingRaw::DataView input,
::device::mojom::SensorReadingRawPtr* output) { … }
bool StructTraits<::device::mojom::SensorConfiguration::DataView, ::device::mojom::SensorConfigurationPtr>::Read(
::device::mojom::SensorConfiguration::DataView input,
::device::mojom::SensorConfigurationPtr* output) { … }
}
namespace device::mojom {
void SensorInterceptorForTesting::GetDefaultConfiguration(GetDefaultConfigurationCallback callback) { … }
void SensorInterceptorForTesting::AddConfiguration(const ::device::PlatformSensorConfiguration& configuration, AddConfigurationCallback callback) { … }
void SensorInterceptorForTesting::RemoveConfiguration(const ::device::PlatformSensorConfiguration& configuration) { … }
void SensorInterceptorForTesting::Suspend() { … }
void SensorInterceptorForTesting::Resume() { … }
void SensorInterceptorForTesting::ConfigureReadingChangeNotifications(bool enabled) { … }
SensorAsyncWaiter::SensorAsyncWaiter(
Sensor* proxy) : … { … }
SensorAsyncWaiter::~SensorAsyncWaiter() = default;
void SensorAsyncWaiter::GetDefaultConfiguration(
::device::PlatformSensorConfiguration* out_configuration) { … }
::device::PlatformSensorConfiguration SensorAsyncWaiter::GetDefaultConfiguration(
) { … }
void SensorAsyncWaiter::AddConfiguration(
const ::device::PlatformSensorConfiguration& configuration, bool* out_success) { … }
bool SensorAsyncWaiter::AddConfiguration(
const ::device::PlatformSensorConfiguration& configuration) { … }
void SensorClientInterceptorForTesting::RaiseError() { … }
void SensorClientInterceptorForTesting::SensorReadingChanged() { … }
SensorClientAsyncWaiter::SensorClientAsyncWaiter(
SensorClient* proxy) : … { … }
SensorClientAsyncWaiter::~SensorClientAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif