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

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

Issue 1164563003: Extract device_sensors to /device via Mojofication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « content/renderer/DEPS ('k') | content/renderer/device_sensors/device_light_event_pump.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b5dd1f43a865b11e8eb0710cfe08e6593177b144..8958b435b8092497528c1bef7c478dc2d1a906fb 100644
--- a/content/renderer/device_sensors/device_light_event_pump.h
+++ b/content/renderer/device_sensors/device_light_event_pump.h
@@ -6,9 +6,10 @@
#define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_LIGHT_EVENT_PUMP_H_
#include "base/memory/scoped_ptr.h"
-#include "content/common/device_sensors/device_light_data.h"
+#include "components/shared_memory_seqlock/shared_memory_seqlock_reader.h"
#include "content/renderer/device_sensors/device_sensor_event_pump.h"
-#include "content/renderer/shared_memory_seqlock_reader.h"
+#include "device/device_sensors/device_light_data.h"
+#include "device/device_sensors/device_sensors.mojom.h"
namespace blink {
class WebDeviceLightListener;
@@ -16,21 +17,18 @@ class WebDeviceLightListener;
namespace content {
-typedef SharedMemorySeqLockReader<DeviceLightData>
- DeviceLightSharedMemoryReader;
+typedef shared_memory_seqlock::SharedMemorySeqLockReader<
+ device::DeviceLightData> DeviceLightSharedMemoryReader;
-class CONTENT_EXPORT DeviceLightEventPump
- : public DeviceSensorEventPump<blink::WebDeviceLightListener> {
+class CONTENT_EXPORT DeviceLightEventPump : public DeviceSensorEventPump {
public:
- explicit DeviceLightEventPump(RenderThread* thread);
+ explicit DeviceLightEventPump(blink::WebDeviceLightListener* listener);
~DeviceLightEventPump() override;
// 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.
- bool OnControlMessageReceived(const IPC::Message& message) override;
void SendFakeDataForTesting(void* data) override;
protected:
@@ -38,15 +36,13 @@ class CONTENT_EXPORT DeviceLightEventPump
void FireEvent() override;
bool InitializeReader(base::SharedMemoryHandle handle) override;
- // PlatformEventObserver implementation.
- void SendStartMessage() override;
- void SendStopMessage() override;
-
private:
bool ShouldFireEvent(double data) const;
scoped_ptr<DeviceLightSharedMemoryReader> reader_;
double last_seen_data_;
+ blink::WebDeviceLightListener* listener_;
+ device::DeviceSensorsLightPtr service_;
DISALLOW_COPY_AND_ASSIGN(DeviceLightEventPump);
};
« no previous file with comments | « content/renderer/DEPS ('k') | content/renderer/device_sensors/device_light_event_pump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698