Chromium Code Reviews| Index: device/generic_sensor/platform_sensor_provider_mac.h |
| diff --git a/device/generic_sensor/platform_sensor_provider_mac.h b/device/generic_sensor/platform_sensor_provider_mac.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5f0ef5aa7150894747ad75179a56ce73c1a1cae6 |
| --- /dev/null |
| +++ b/device/generic_sensor/platform_sensor_provider_mac.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_PROVIDER_MAC_H_ |
| +#define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_PROVIDER_MAC_H_ |
| + |
| +#include "device/generic_sensor/platform_sensor_provider.h" |
| + |
| +namespace device { |
| + |
| +class SensorsPollingThreadMac; |
| + |
| +class PlatformSensorProviderMac : public PlatformSensorProvider { |
| + public: |
| + PlatformSensorProviderMac(); |
| + ~PlatformSensorProviderMac() override; |
| + |
| + static PlatformSensorProviderMac* GetInstance(); |
| + void BeginPollingSensor(PlatformSensor* sensor, |
|
Mikhail
2016/09/13 09:27:35
this is not smth Provider should do (it's just a f
|
| + const PlatformSensorConfiguration& configuration); |
| + void StopPollingSensor(PlatformSensor* sensor); |
| + |
| + protected: |
| + scoped_refptr<PlatformSensor> CreateSensorInternal( |
| + mojom::SensorType type, |
| + mojo::ScopedSharedBufferMapping mapping, |
| + uint64_t buffer_size) override; |
| + |
| + private: |
| + std::unique_ptr<SensorsPollingThreadMac> polling_thread_; |
| + DISALLOW_COPY_AND_ASSIGN(PlatformSensorProviderMac); |
| +}; |
| + |
| +} // namespace device |
| + |
| +#endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_PROVIDER_MAC_H_ |