| // services/device/public/mojom/sensor.mojom-test-utils.h is auto generated by mojom_bindings_generator.py, do not edit |
| |
| // Copyright 2019 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #ifndef SERVICES_DEVICE_PUBLIC_MOJOM_SENSOR_MOJOM_TEST_UTILS_H_ |
| #define SERVICES_DEVICE_PUBLIC_MOJOM_SENSOR_MOJOM_TEST_UTILS_H_ |
| |
| #include "services/device/public/mojom/sensor.mojom.h" |
| |
| |
| namespace device::mojom { |
| |
| |
| class SensorInterceptorForTesting : public Sensor { |
| virtual Sensor* GetForwardingInterface() = 0; |
| void GetDefaultConfiguration(GetDefaultConfigurationCallback callback) override; |
| void AddConfiguration(const ::device::PlatformSensorConfiguration& configuration, AddConfigurationCallback callback) override; |
| void RemoveConfiguration(const ::device::PlatformSensorConfiguration& configuration) override; |
| void Suspend() override; |
| void Resume() override; |
| void ConfigureReadingChangeNotifications(bool enabled) override; |
| }; |
| class SensorAsyncWaiter { |
| public: |
| explicit SensorAsyncWaiter(Sensor* proxy); |
| |
| SensorAsyncWaiter(const SensorAsyncWaiter&) = delete; |
| SensorAsyncWaiter& operator=(const SensorAsyncWaiter&) = delete; |
| |
| ~SensorAsyncWaiter(); |
| void GetDefaultConfiguration( |
| ::device::PlatformSensorConfiguration* out_configuration); |
| ::device::PlatformSensorConfiguration GetDefaultConfiguration(); |
| void AddConfiguration( |
| const ::device::PlatformSensorConfiguration& configuration, bool* out_success); |
| bool AddConfiguration(const ::device::PlatformSensorConfiguration& configuration); |
| |
| private: |
| Sensor* const proxy_; |
| }; |
| |
| |
| class SensorClientInterceptorForTesting : public SensorClient { |
| virtual SensorClient* GetForwardingInterface() = 0; |
| void RaiseError() override; |
| void SensorReadingChanged() override; |
| }; |
| class SensorClientAsyncWaiter { |
| public: |
| explicit SensorClientAsyncWaiter(SensorClient* proxy); |
| |
| SensorClientAsyncWaiter(const SensorClientAsyncWaiter&) = delete; |
| SensorClientAsyncWaiter& operator=(const SensorClientAsyncWaiter&) = delete; |
| |
| ~SensorClientAsyncWaiter(); |
| |
| private: |
| SensorClient* const proxy_; |
| }; |
| |
| |
| |
| |
| } // device::mojom |
| |
| #endif // SERVICES_DEVICE_PUBLIC_MOJOM_SENSOR_MOJOM_TEST_UTILS_H_ |