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

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

Issue 470683002: Revert "Refactor code listening to platform events in content/renderer/." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 97339d45b73544dffd6fbae67e752269a4c3f526..c02f814142bc2e13cfa94cc7a75a841c0fd1d1e6 100644
--- a/content/renderer/device_sensors/device_motion_event_pump.h
+++ b/content/renderer/device_sensors/device_motion_event_pump.h
@@ -19,27 +19,27 @@ namespace content {
typedef SharedMemorySeqLockReader<blink::WebDeviceMotionData>
DeviceMotionSharedMemoryReader;
-class CONTENT_EXPORT DeviceMotionEventPump
- : public DeviceSensorEventPump<blink::WebDeviceMotionListener> {
+class CONTENT_EXPORT DeviceMotionEventPump : public DeviceSensorEventPump {
public:
- explicit DeviceMotionEventPump(RenderThread* thread);
+ DeviceMotionEventPump();
+ explicit DeviceMotionEventPump(int pump_delay_millis);
virtual ~DeviceMotionEventPump();
- // // PlatformEventObserver.
+ // Sets the listener to receive updates for device motion data at
+ // regular intervals. Returns true if the registration was successful.
+ bool SetListener(blink::WebDeviceMotionListener* listener);
+
+ // RenderProcessObserver implementation.
virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
- virtual void SendFakeDataForTesting(void* fake_data) OVERRIDE;
protected:
virtual void FireEvent() OVERRIDE;
virtual bool InitializeReader(base::SharedMemoryHandle handle) OVERRIDE;
+ virtual bool SendStartMessage() OVERRIDE;
+ virtual bool SendStopMessage() OVERRIDE;
- // PlatformEventObserver.
- virtual void SendStartMessage() OVERRIDE;
- virtual void SendStopMessage() OVERRIDE;
-
+ blink::WebDeviceMotionListener* listener_;
scoped_ptr<DeviceMotionSharedMemoryReader> reader_;
-
- DISALLOW_COPY_AND_ASSIGN(DeviceMotionEventPump);
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698