| 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_RENDERER_DEVICE_SENSORS_DEVICE_MOTION_EVENT_PUMP_H_ | 5 #ifndef CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_MOTION_EVENT_PUMP_H_ |
| 6 #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_MOTION_EVENT_PUMP_H_ | 6 #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_MOTION_EVENT_PUMP_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "content/renderer/device_sensors/device_sensor_event_pump.h" | 11 #include "content/renderer/device_sensors/device_sensor_event_pump.h" |
| 11 #include "content/renderer/shared_memory_seqlock_reader.h" | 12 #include "content/renderer/shared_memory_seqlock_reader.h" |
| 12 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eMotionData.h" | 13 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eMotionData.h" |
| 13 | 14 |
| 14 namespace blink { | 15 namespace blink { |
| 15 class WebDeviceMotionListener; | 16 class WebDeviceMotionListener; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace content { | 19 namespace content { |
| 19 | 20 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 31 void SendFakeDataForTesting(void* fake_data) override; | 32 void SendFakeDataForTesting(void* fake_data) override; |
| 32 | 33 |
| 33 protected: | 34 protected: |
| 34 void FireEvent() override; | 35 void FireEvent() override; |
| 35 bool InitializeReader(base::SharedMemoryHandle handle) override; | 36 bool InitializeReader(base::SharedMemoryHandle handle) override; |
| 36 | 37 |
| 37 // PlatformEventObserver. | 38 // PlatformEventObserver. |
| 38 void SendStartMessage() override; | 39 void SendStartMessage() override; |
| 39 void SendStopMessage() override; | 40 void SendStopMessage() override; |
| 40 | 41 |
| 41 scoped_ptr<DeviceMotionSharedMemoryReader> reader_; | 42 std::unique_ptr<DeviceMotionSharedMemoryReader> reader_; |
| 42 | 43 |
| 43 DISALLOW_COPY_AND_ASSIGN(DeviceMotionEventPump); | 44 DISALLOW_COPY_AND_ASSIGN(DeviceMotionEventPump); |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 } // namespace content | 47 } // namespace content |
| 47 | 48 |
| 48 #endif // CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_MOTION_EVENT_PUMP_H_ | 49 #endif // CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_MOTION_EVENT_PUMP_H_ |
| OLD | NEW |