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

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, 5 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 3091efb66bd1c7a1cd07faa610c3c96392009b83..69c6804138d7beea1ec3fc57adef8e23334829f2 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 DeviceSensorMojoClientMixin<
+ 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;
« 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