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

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: 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..67ed98ba41b04ef8e08cdd106c465f40ea259a6d 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,24 +23,22 @@ typedef SharedMemorySeqLockReader<blink::WebDeviceMotionData>
DeviceMotionSharedMemoryReader;
class CONTENT_EXPORT DeviceMotionEventPump
- : public DeviceSensorEventPump<blink::WebDeviceMotionListener> {
+ : public DeviceMojoClientMixin<
+ 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_;
+ bool using_fake_data_for_testing_ = false;
timvolodine 2016/06/09 17:43:47 why is this needed?
Sam McNally 2016/06/10 01:07:51 Removed it.
DISALLOW_COPY_AND_ASSIGN(DeviceMotionEventPump);
};

Powered by Google App Engine
This is Rietveld 408576698