Index: device/generic_sensor/platform_sensor_polling_mac.h |
diff --git a/device/generic_sensor/platform_sensor_polling_mac.h b/device/generic_sensor/platform_sensor_polling_mac.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d89c14d0ceb9edd036e7065e8f1aaef8558a1594 |
--- /dev/null |
+++ b/device/generic_sensor/platform_sensor_polling_mac.h |
@@ -0,0 +1,33 @@ |
+// 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_POLLING_MAC_H_ |
+#define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_POLLING_MAC_H_ |
Mikhail
2016/09/13 09:27:35
shouldn't file be named as platform_sensor_polling
|
+ |
+#include "base/threading/thread.h" |
+#include "base/timer/timer.h" |
+#include "device/generic_sensor/platform_sensor_mac.h" |
+ |
+namespace device { |
+ |
+class SensorsPollingThreadMac : public base::Thread { |
+ public: |
+ SensorsPollingThreadMac(const char* name); |
+ ~SensorsPollingThreadMac() override; |
+ |
+ void BeginPollingSensor(PlatformSensorMac* sensor, |
+ const PlatformSensorConfiguration& configuration); |
+ void StopPollingSensor(PlatformSensorMac* sensor); |
+ |
+ private: |
+ using SensorsMap = |
+ std::map<PlatformSensorMac*, std::unique_ptr<base::RepeatingTimer>>; |
Mikhail
2016/09/13 09:27:35
Think it would be better if 'PlatformSensorMac' it
|
+ SensorsMap sensors_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(SensorsPollingThreadMac); |
+}; |
+ |
+} // namespace device |
+ |
+#endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_POLLING_MAC_H_ |