| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ORIENTATION_DATA_FETCHER_SHARED_MEMORY_H_ | 5 #ifndef CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_SHARED_MEMORY_H_ |
| 6 #define CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_SHARED_MEMORY_H_ | 6 #define CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_SHARED_MEMORY_H_ |
| 7 | 7 |
| 8 #include "content/browser/device_orientation/data_fetcher_shared_memory_base.h" | 8 #include "content/browser/device_orientation/data_fetcher_shared_memory_base.h" |
| 9 | 9 |
| 10 #if !defined(OS_ANDROID) | 10 #if !defined(OS_ANDROID) |
| 11 #include "content/common/device_light/device_light_hardware_buffer.h" |
| 11 #include "content/common/device_orientation/device_motion_hardware_buffer.h" | 12 #include "content/common/device_orientation/device_motion_hardware_buffer.h" |
| 12 #include "content/common/device_orientation/device_orientation_hardware_buffer.h
" | 13 #include "content/common/device_orientation/device_orientation_hardware_buffer.h
" |
| 13 #endif | 14 #endif |
| 14 | 15 |
| 15 #if defined(OS_MACOSX) | 16 #if defined(OS_MACOSX) |
| 16 class SuddenMotionSensor; | 17 class SuddenMotionSensor; |
| 17 #elif defined(OS_WIN) | 18 #elif defined(OS_WIN) |
| 18 #include <SensorsApi.h> | 19 #include <SensorsApi.h> |
| 19 #include "base/win/scoped_comptr.h" | 20 #include "base/win/scoped_comptr.h" |
| 20 #endif | 21 #endif |
| 21 | 22 |
| 22 namespace content { | 23 namespace content { |
| 23 | 24 |
| 24 class CONTENT_EXPORT DataFetcherSharedMemory | 25 class CONTENT_EXPORT DataFetcherSharedMemory |
| 25 : public DataFetcherSharedMemoryBase { | 26 : public DataFetcherSharedMemoryBase { |
| 26 | 27 |
| 27 public: | 28 public: |
| 28 DataFetcherSharedMemory(); | 29 DataFetcherSharedMemory(); |
| 29 virtual ~DataFetcherSharedMemory(); | 30 virtual ~DataFetcherSharedMemory(); |
| 30 | 31 |
| 31 private: | 32 private: |
| 32 virtual bool Start(ConsumerType consumer_type, void* buffer) OVERRIDE; | 33 virtual bool Start(ConsumerType consumer_type, void* buffer) OVERRIDE; |
| 33 virtual bool Stop(ConsumerType consumer_type) OVERRIDE; | 34 virtual bool Stop(ConsumerType consumer_type) OVERRIDE; |
| 34 | 35 |
| 35 #if !defined(OS_ANDROID) | 36 #if !defined(OS_ANDROID) |
| 37 DeviceLightHardwareBuffer* light_buffer_; |
| 36 DeviceMotionHardwareBuffer* motion_buffer_; | 38 DeviceMotionHardwareBuffer* motion_buffer_; |
| 37 DeviceOrientationHardwareBuffer* orientation_buffer_; | 39 DeviceOrientationHardwareBuffer* orientation_buffer_; |
| 38 #endif | 40 #endif |
| 39 #if defined(OS_MACOSX) | 41 #if defined(OS_MACOSX) |
| 40 virtual void Fetch(unsigned consumer_bitmask) OVERRIDE; | 42 virtual void Fetch(unsigned consumer_bitmask) OVERRIDE; |
| 41 virtual FetcherType GetType() const OVERRIDE; | 43 virtual FetcherType GetType() const OVERRIDE; |
| 42 | 44 |
| 43 scoped_ptr<SuddenMotionSensor> sudden_motion_sensor_; | 45 scoped_ptr<SuddenMotionSensor> sudden_motion_sensor_; |
| 44 #elif defined(OS_WIN) | 46 #elif defined(OS_WIN) |
| 45 class SensorEventSink; | 47 class SensorEventSink; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 57 base::win::ScopedComPtr<ISensor> sensor_accelerometer_; | 59 base::win::ScopedComPtr<ISensor> sensor_accelerometer_; |
| 58 base::win::ScopedComPtr<ISensor> sensor_gyrometer_; | 60 base::win::ScopedComPtr<ISensor> sensor_gyrometer_; |
| 59 #endif | 61 #endif |
| 60 | 62 |
| 61 DISALLOW_COPY_AND_ASSIGN(DataFetcherSharedMemory); | 63 DISALLOW_COPY_AND_ASSIGN(DataFetcherSharedMemory); |
| 62 }; | 64 }; |
| 63 | 65 |
| 64 } // namespace content | 66 } // namespace content |
| 65 | 67 |
| 66 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_SHARED_MEMORY_H_ | 68 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_SHARED_MEMORY_H_ |
| OLD | NEW |