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_MACOSX) | 10 #if defined(OS_MACOSX) |
11 #include "content/common/device_motion_hardware_buffer.h" | 11 #include "content/common/device_motion_hardware_buffer.h" |
12 #include "content/common/device_orientation/device_orientation_hardware_buffer.h " | 12 #include "content/common/device_orientation/device_orientation_hardware_buffer.h " |
13 | 13 |
14 class SuddenMotionSensor; | 14 class SuddenMotionSensor; |
15 #endif | 15 #endif |
16 | 16 |
17 #if defined(OS_WIN) | |
bulach
2013/09/02 13:29:34
nit: could commbine with line 15 with an #elif
timvolodine
2013/09/03 17:14:51
Done.
| |
18 #include <SensorsApi.h> | |
19 #include "base/win/scoped_comptr.h" | |
20 #include "content/common/device_motion_hardware_buffer.h" | |
21 #include "content/common/device_orientation/device_orientation_hardware_buffer.h " | |
22 #endif | |
23 | |
17 namespace content { | 24 namespace content { |
18 | 25 |
19 class CONTENT_EXPORT DataFetcherSharedMemory | 26 class CONTENT_EXPORT DataFetcherSharedMemory |
20 : public DataFetcherSharedMemoryBase { | 27 : public DataFetcherSharedMemoryBase { |
21 | 28 |
22 public: | 29 public: |
23 DataFetcherSharedMemory(); | 30 DataFetcherSharedMemory(); |
24 virtual ~DataFetcherSharedMemory(); | 31 virtual ~DataFetcherSharedMemory(); |
25 | 32 |
26 private: | 33 private: |
27 | 34 |
28 virtual bool Start(ConsumerType consumer_type) OVERRIDE; | 35 virtual bool Start(ConsumerType consumer_type) OVERRIDE; |
29 virtual bool Stop(ConsumerType consumer_type) OVERRIDE; | 36 virtual bool Stop(ConsumerType consumer_type) OVERRIDE; |
30 | 37 |
31 #if defined(OS_MACOSX) | 38 #if defined(OS_MACOSX) |
32 virtual void Fetch(unsigned consumer_bitmask) OVERRIDE; | 39 virtual void Fetch(unsigned consumer_bitmask) OVERRIDE; |
33 virtual bool IsPolling() const OVERRIDE; | 40 virtual bool IsPolling() const OVERRIDE; |
34 | 41 |
35 DeviceMotionHardwareBuffer* motion_buffer_; | 42 DeviceMotionHardwareBuffer* motion_buffer_; |
36 DeviceOrientationHardwareBuffer* orientation_buffer_; | 43 DeviceOrientationHardwareBuffer* orientation_buffer_; |
37 scoped_ptr<SuddenMotionSensor> sudden_motion_sensor_; | 44 scoped_ptr<SuddenMotionSensor> sudden_motion_sensor_; |
38 #endif | 45 #endif |
39 | 46 |
47 #if defined(OS_WIN) | |
48 class SensorEventSink; | |
49 friend SensorEventSink; | |
50 | |
51 DeviceOrientationHardwareBuffer* orientation_buffer_; | |
52 base::win::ScopedComPtr<ISensor> sensor_; | |
53 #endif | |
54 | |
40 DISALLOW_COPY_AND_ASSIGN(DataFetcherSharedMemory); | 55 DISALLOW_COPY_AND_ASSIGN(DataFetcherSharedMemory); |
41 }; | 56 }; |
42 | 57 |
43 } // namespace content | 58 } // namespace content |
44 | 59 |
45 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_SHARED_MEMORY_H_ | 60 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_SHARED_MEMORY_H_ |
OLD | NEW |