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

Unified Diff: content/renderer/device_sensors/device_light_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_light_event_pump.h
diff --git a/content/renderer/device_sensors/device_light_event_pump.h b/content/renderer/device_sensors/device_light_event_pump.h
index 13b22b1b37e760970d36de86f81a7b9ff28b114e..a998adffb3232554c72e0beb05c15e4d02e69e51 100644
--- a/content/renderer/device_sensors/device_light_event_pump.h
+++ b/content/renderer/device_sensors/device_light_event_pump.h
@@ -19,29 +19,27 @@ namespace content {
typedef SharedMemorySeqLockReader<DeviceLightData>
DeviceLightSharedMemoryReader;
-class CONTENT_EXPORT DeviceLightEventPump
- : public DeviceSensorEventPump<blink::WebDeviceLightListener> {
+class CONTENT_EXPORT DeviceLightEventPump : public DeviceSensorEventPump {
public:
- explicit DeviceLightEventPump(RenderThread* thread);
+ DeviceLightEventPump();
+ explicit DeviceLightEventPump(int pump_delay_millis);
virtual ~DeviceLightEventPump();
// Sets the listener to receive updates for device light data at
// regular intervals. Returns true if the registration was successful.
bool SetListener(blink::WebDeviceLightListener* listener);
- // PlatformEventObserver implementation.
+ // RenderProcessObserver implementation.
virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
- virtual void SendFakeDataForTesting(void* data) OVERRIDE;
protected:
// Methods overriden from base class DeviceSensorEventPump
virtual void FireEvent() OVERRIDE;
virtual bool InitializeReader(base::SharedMemoryHandle handle) OVERRIDE;
+ virtual bool SendStartMessage() OVERRIDE;
+ virtual bool SendStopMessage() OVERRIDE;
- // PlatformEventObserver implementation.
- virtual void SendStartMessage() OVERRIDE;
- virtual void SendStopMessage() OVERRIDE;
-
+ blink::WebDeviceLightListener* listener_;
scoped_ptr<DeviceLightSharedMemoryReader> reader_;
double last_seen_data_;

Powered by Google App Engine
This is Rietveld 408576698