Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_POLLING_MAC_H_ | |
| 6 #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
| |
| 7 | |
| 8 #include "base/threading/thread.h" | |
| 9 #include "base/timer/timer.h" | |
| 10 #include "device/generic_sensor/platform_sensor_mac.h" | |
| 11 | |
| 12 namespace device { | |
| 13 | |
| 14 class SensorsPollingThreadMac : public base::Thread { | |
| 15 public: | |
| 16 SensorsPollingThreadMac(const char* name); | |
| 17 ~SensorsPollingThreadMac() override; | |
| 18 | |
| 19 void BeginPollingSensor(PlatformSensorMac* sensor, | |
| 20 const PlatformSensorConfiguration& configuration); | |
| 21 void StopPollingSensor(PlatformSensorMac* sensor); | |
| 22 | |
| 23 private: | |
| 24 using SensorsMap = | |
| 25 std::map<PlatformSensorMac*, std::unique_ptr<base::RepeatingTimer>>; | |
|
Mikhail
2016/09/13 09:27:35
Think it would be better if 'PlatformSensorMac' it
| |
| 26 SensorsMap sensors_; | |
| 27 | |
| 28 DISALLOW_COPY_AND_ASSIGN(SensorsPollingThreadMac); | |
| 29 }; | |
| 30 | |
| 31 } // namespace device | |
| 32 | |
| 33 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_POLLING_MAC_H_ | |
| OLD | NEW |