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

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

Issue 2845763002: Remove DeviceLightEvent implementation (Closed)
Patch Set: same as previous patch Created 3 years, 8 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/BUILD.gn ('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
deleted file mode 100644
index 8795916c64c5b387670338a007d5d61032c05630..0000000000000000000000000000000000000000
--- a/content/renderer/device_sensors/device_light_event_pump.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_LIGHT_EVENT_PUMP_H_
-#define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_LIGHT_EVENT_PUMP_H_
-
-#include <memory>
-
-#include "base/macros.h"
-#include "content/renderer/device_sensors/device_sensor_event_pump.h"
-#include "content/renderer/shared_memory_seqlock_reader.h"
-#include "device/sensors/public/cpp/device_light_data.h"
-#include "device/sensors/public/interfaces/light.mojom.h"
-
-namespace blink {
-class WebDeviceLightListener;
-}
-
-namespace content {
-
-typedef SharedMemorySeqLockReader<device::DeviceLightData>
- DeviceLightSharedMemoryReader;
-
-class CONTENT_EXPORT DeviceLightEventPump
- : public DeviceSensorMojoClientMixin<
- DeviceSensorEventPump<blink::WebDeviceLightListener>,
- device::mojom::LightSensor> {
- public:
- explicit DeviceLightEventPump(RenderThread* thread);
- ~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.
- void SendFakeDataForTesting(void* data) override;
-
- protected:
- // Methods overriden from base class DeviceSensorEventPump
- void FireEvent() override;
- bool InitializeReader(base::SharedMemoryHandle handle) override;
-
- private:
- bool ShouldFireEvent(double data) const;
-
- std::unique_ptr<DeviceLightSharedMemoryReader> reader_;
- double last_seen_data_;
-
- DISALLOW_COPY_AND_ASSIGN(DeviceLightEventPump);
-};
-
-} // namespace content
-
-#endif // CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_LIGHT_EVENT_PUMP_H_
« no previous file with comments | « content/renderer/BUILD.gn ('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