| 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 27 matching lines...) Expand all Loading... |
| 38 ~DataFetcherSharedMemory() override; | 38 ~DataFetcherSharedMemory() override; |
| 39 | 39 |
| 40 #if defined(OS_ANDROID) | 40 #if defined(OS_ANDROID) |
| 41 void Shutdown() override; | 41 void Shutdown() override; |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 bool Start(ConsumerType consumer_type, void* buffer) override; | 45 bool Start(ConsumerType consumer_type, void* buffer) override; |
| 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_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) |
| 49 DeviceMotionHardwareBuffer* motion_buffer_; | 49 #if !defined(OS_CHROMEOS) |
| 50 DeviceOrientationHardwareBuffer* orientation_buffer_; | 50 DeviceMotionHardwareBuffer* motion_buffer_ = nullptr; |
| 51 DeviceOrientationHardwareBuffer* orientation_absolute_buffer_; | 51 DeviceOrientationHardwareBuffer* orientation_buffer_ = nullptr; |
| 52 DeviceLightHardwareBuffer* light_buffer_; | 52 DeviceLightHardwareBuffer* light_buffer_ = nullptr; |
| 53 #endif |
| 54 DeviceOrientationHardwareBuffer* orientation_absolute_buffer_ = nullptr; |
| 53 #endif | 55 #endif |
| 54 | 56 |
| 55 #if defined(OS_CHROMEOS) | 57 #if defined(OS_CHROMEOS) |
| 56 std::unique_ptr<SensorManagerChromeOS> sensor_manager_; | 58 std::unique_ptr<SensorManagerChromeOS> sensor_manager_; |
| 57 #elif defined(OS_MACOSX) | 59 #elif defined(OS_MACOSX) |
| 58 void Fetch(unsigned consumer_bitmask) override; | 60 void Fetch(unsigned consumer_bitmask) override; |
| 59 FetcherType GetType() const override; | 61 FetcherType GetType() const override; |
| 60 | 62 |
| 61 std::unique_ptr<AmbientLightSensor> ambient_light_sensor_; | 63 std::unique_ptr<AmbientLightSensor> ambient_light_sensor_; |
| 62 std::unique_ptr<SuddenMotionSensor> sudden_motion_sensor_; | 64 std::unique_ptr<SuddenMotionSensor> sudden_motion_sensor_; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 79 base::win::ScopedComPtr<ISensor> sensor_gyrometer_; | 81 base::win::ScopedComPtr<ISensor> sensor_gyrometer_; |
| 80 base::win::ScopedComPtr<ISensor> sensor_light_; | 82 base::win::ScopedComPtr<ISensor> sensor_light_; |
| 81 #endif | 83 #endif |
| 82 | 84 |
| 83 DISALLOW_COPY_AND_ASSIGN(DataFetcherSharedMemory); | 85 DISALLOW_COPY_AND_ASSIGN(DataFetcherSharedMemory); |
| 84 }; | 86 }; |
| 85 | 87 |
| 86 } // namespace content | 88 } // namespace content |
| 87 | 89 |
| 88 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_ | 90 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_ |
| OLD | NEW |