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

Unified Diff: content/renderer/device_sensors/device_light_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_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 3091efb66bd1c7a1cd07faa610c3c96392009b83..c2f7805b573a8d92d879ee1688c45bd872a8c9d8 100644
--- a/content/renderer/device_sensors/device_light_event_pump.h
+++ b/content/renderer/device_sensors/device_light_event_pump.h
@@ -11,6 +11,7 @@
#include "content/common/device_sensors/device_light_data.h"
#include "content/renderer/device_sensors/device_sensor_event_pump.h"
#include "content/renderer/shared_memory_seqlock_reader.h"
+#include "device/sensors/public/interfaces/light.mojom.h"
namespace blink {
class WebDeviceLightListener;
@@ -22,7 +23,9 @@ typedef SharedMemorySeqLockReader<DeviceLightData>
DeviceLightSharedMemoryReader;
class CONTENT_EXPORT DeviceLightEventPump
- : public DeviceSensorEventPump<blink::WebDeviceLightListener> {
+ : public DeviceMojoClientMixin<
+ DeviceSensorEventPump<blink::WebDeviceLightListener>,
+ device::mojom::LightSensor> {
public:
explicit DeviceLightEventPump(RenderThread* thread);
~DeviceLightEventPump() override;
@@ -32,7 +35,6 @@ class CONTENT_EXPORT DeviceLightEventPump
bool SetListener(blink::WebDeviceLightListener* listener);
// PlatformEventObserver implementation.
- bool OnControlMessageReceived(const IPC::Message& message) override;
void SendFakeDataForTesting(void* data) override;
protected:
@@ -40,10 +42,6 @@ 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;

Powered by Google App Engine
This is Rietveld 408576698