Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1596)

Unified Diff: content/renderer/device_sensors/device_motion_event_pump.h

Issue 2037513002: Convert device_sensors to use mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@conversion--mime-registry
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/device_sensors/device_motion_event_pump.h
diff --git a/content/renderer/device_sensors/device_motion_event_pump.h b/content/renderer/device_sensors/device_motion_event_pump.h
index 1fb222920e835488c8a3273fd5b1c5dae40272f3..81968f74b1ae496c8e177d241bc94e2a7219c49c 100644
--- a/content/renderer/device_sensors/device_motion_event_pump.h
+++ b/content/renderer/device_sensors/device_motion_event_pump.h
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "content/renderer/device_sensors/device_sensor_event_pump.h"
#include "content/renderer/shared_memory_seqlock_reader.h"
+#include "device/sensors/public/interfaces/motion.mojom.h"
#include "third_party/WebKit/public/platform/modules/device_orientation/WebDeviceMotionData.h"
namespace blink {
@@ -22,23 +23,20 @@ typedef SharedMemorySeqLockReader<blink::WebDeviceMotionData>
DeviceMotionSharedMemoryReader;
class CONTENT_EXPORT DeviceMotionEventPump
- : public DeviceSensorEventPump<blink::WebDeviceMotionListener> {
+ : public DeviceSensorMojoClientMixin<
+ DeviceSensorEventPump<blink::WebDeviceMotionListener>,
+ device::mojom::MotionSensor> {
public:
explicit DeviceMotionEventPump(RenderThread* thread);
~DeviceMotionEventPump() override;
- // // PlatformEventObserver.
- bool OnControlMessageReceived(const IPC::Message& message) override;
+ // PlatformEventObserver.
void SendFakeDataForTesting(void* fake_data) override;
protected:
void FireEvent() override;
bool InitializeReader(base::SharedMemoryHandle handle) override;
- // PlatformEventObserver.
- void SendStartMessage() override;
- void SendStopMessage() override;
-
std::unique_ptr<DeviceMotionSharedMemoryReader> reader_;
DISALLOW_COPY_AND_ASSIGN(DeviceMotionEventPump);

Powered by Google App Engine
This is Rietveld 408576698