OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_ | 5 #ifndef CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_ |
6 #define CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_ | 6 #define CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "content/browser/device_sensors/data_fetcher_shared_memory_base.h" | 10 #include "content/browser/device_sensors/data_fetcher_shared_memory_base.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 bool Stop(ConsumerType consumer_type) override; | 46 bool Stop(ConsumerType consumer_type) override; |
47 | 47 |
48 #if !defined(OS_ANDROID) | 48 #if !defined(OS_ANDROID) |
49 DeviceMotionHardwareBuffer* motion_buffer_; | 49 DeviceMotionHardwareBuffer* motion_buffer_; |
50 DeviceOrientationHardwareBuffer* orientation_buffer_; | 50 DeviceOrientationHardwareBuffer* orientation_buffer_; |
51 DeviceOrientationHardwareBuffer* orientation_absolute_buffer_; | 51 DeviceOrientationHardwareBuffer* orientation_absolute_buffer_; |
52 DeviceLightHardwareBuffer* light_buffer_; | 52 DeviceLightHardwareBuffer* light_buffer_; |
53 #endif | 53 #endif |
54 | 54 |
55 #if defined(OS_CHROMEOS) | 55 #if defined(OS_CHROMEOS) |
56 scoped_ptr<SensorManagerChromeOS> sensor_manager_; | 56 std::unique_ptr<SensorManagerChromeOS> sensor_manager_; |
57 #elif defined(OS_MACOSX) | 57 #elif defined(OS_MACOSX) |
58 void Fetch(unsigned consumer_bitmask) override; | 58 void Fetch(unsigned consumer_bitmask) override; |
59 FetcherType GetType() const override; | 59 FetcherType GetType() const override; |
60 | 60 |
61 scoped_ptr<AmbientLightSensor> ambient_light_sensor_; | 61 std::unique_ptr<AmbientLightSensor> ambient_light_sensor_; |
62 scoped_ptr<SuddenMotionSensor> sudden_motion_sensor_; | 62 std::unique_ptr<SuddenMotionSensor> sudden_motion_sensor_; |
63 #elif defined(OS_WIN) | 63 #elif defined(OS_WIN) |
64 class SensorEventSink; | 64 class SensorEventSink; |
65 class SensorEventSinkMotion; | 65 class SensorEventSinkMotion; |
66 class SensorEventSinkOrientation; | 66 class SensorEventSinkOrientation; |
67 class SensorEventSinkLight; | 67 class SensorEventSinkLight; |
68 | 68 |
69 FetcherType GetType() const override; | 69 FetcherType GetType() const override; |
70 | 70 |
71 bool RegisterForSensor(REFSENSOR_TYPE_ID sensor_type, ISensor** sensor, | 71 bool RegisterForSensor(REFSENSOR_TYPE_ID sensor_type, ISensor** sensor, |
72 scoped_refptr<SensorEventSink> event_sink); | 72 scoped_refptr<SensorEventSink> event_sink); |
73 void DisableSensors(ConsumerType consumer_type); | 73 void DisableSensors(ConsumerType consumer_type); |
74 void SetBufferAvailableState(ConsumerType consumer_type, bool enabled); | 74 void SetBufferAvailableState(ConsumerType consumer_type, bool enabled); |
75 | 75 |
76 base::win::ScopedComPtr<ISensor> sensor_inclinometer_; | 76 base::win::ScopedComPtr<ISensor> sensor_inclinometer_; |
77 base::win::ScopedComPtr<ISensor> sensor_accelerometer_; | 77 base::win::ScopedComPtr<ISensor> sensor_accelerometer_; |
78 base::win::ScopedComPtr<ISensor> sensor_gyrometer_; | 78 base::win::ScopedComPtr<ISensor> sensor_gyrometer_; |
79 base::win::ScopedComPtr<ISensor> sensor_light_; | 79 base::win::ScopedComPtr<ISensor> sensor_light_; |
80 #endif | 80 #endif |
81 | 81 |
82 DISALLOW_COPY_AND_ASSIGN(DataFetcherSharedMemory); | 82 DISALLOW_COPY_AND_ASSIGN(DataFetcherSharedMemory); |
83 }; | 83 }; |
84 | 84 |
85 } // namespace content | 85 } // namespace content |
86 | 86 |
87 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_ | 87 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_ |
OLD | NEW |