Commit c92a99f2 authored by Oksana Zhuravlova's avatar Oksana Zhuravlova Committed by Commit Bot

Remove unused references to WebDevice*Listener

This change removes the listener template parameter from
DeviceSensorEventPump and any dependencies on WebDevice*Listener.

Bug: 861902
Change-Id: I91ec5f709eaa74acca35fa884e971f3f60e8f294
Reviewed-on: https://chromium-review.googlesource.com/1176199Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Reviewed-by: default avatarTim Volodine <timvolodine@chromium.org>
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584111}
parent 46b48ae1
...@@ -17,7 +17,7 @@ class DeviceMotionData; ...@@ -17,7 +17,7 @@ class DeviceMotionData;
class MODULES_EXPORT DeviceMotionEventPump class MODULES_EXPORT DeviceMotionEventPump
: public GarbageCollectedFinalized<DeviceMotionEventPump>, : public GarbageCollectedFinalized<DeviceMotionEventPump>,
public DeviceSensorEventPump<WebDeviceMotionListener>, public DeviceSensorEventPump,
public PlatformEventDispatcher { public PlatformEventDispatcher {
USING_GARBAGE_COLLECTED_MIXIN(DeviceMotionEventPump); USING_GARBAGE_COLLECTED_MIXIN(DeviceMotionEventPump);
......
...@@ -15,7 +15,7 @@ namespace blink { ...@@ -15,7 +15,7 @@ namespace blink {
class MODULES_EXPORT DeviceOrientationEventPump class MODULES_EXPORT DeviceOrientationEventPump
: public GarbageCollectedFinalized<DeviceOrientationEventPump>, : public GarbageCollectedFinalized<DeviceOrientationEventPump>,
public DeviceSensorEventPump<WebDeviceOrientationListener>, public DeviceSensorEventPump,
public PlatformEventDispatcher { public PlatformEventDispatcher {
USING_GARBAGE_COLLECTED_MIXIN(DeviceOrientationEventPump); USING_GARBAGE_COLLECTED_MIXIN(DeviceOrientationEventPump);
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
#include "services/device/public/cpp/generic_sensor/sensor_reading.h" #include "services/device/public/cpp/generic_sensor/sensor_reading.h"
#include "services/device/public/cpp/generic_sensor/sensor_reading_shared_buffer_reader.h" #include "services/device/public/cpp/generic_sensor/sensor_reading_shared_buffer_reader.h"
#include "services/device/public/mojom/sensor_provider.mojom-blink.h" #include "services/device/public/mojom/sensor_provider.mojom-blink.h"
#include "third_party/blink/public/platform/modules/device_orientation/web_device_motion_listener.h"
#include "third_party/blink/public/platform/modules/device_orientation/web_device_orientation_listener.h"
#include "third_party/blink/renderer/platform/timer.h" #include "third_party/blink/renderer/platform/timer.h"
#include "third_party/blink/renderer/platform/wtf/functional.h" #include "third_party/blink/renderer/platform/wtf/functional.h"
...@@ -23,7 +21,6 @@ namespace blink { ...@@ -23,7 +21,6 @@ namespace blink {
class LocalFrame; class LocalFrame;
template <typename ListenerType>
class DeviceSensorEventPump { class DeviceSensorEventPump {
public: public:
// Default rate for firing events. // Default rate for firing events.
...@@ -55,10 +52,7 @@ class DeviceSensorEventPump { ...@@ -55,10 +52,7 @@ class DeviceSensorEventPump {
SUSPENDED SUSPENDED
}; };
// The default nullptr for listener is temporary until listener is eliminated virtual void Start(LocalFrame* frame) {
// TODO(crbug.com/861902)
virtual void Start(LocalFrame* frame,
blink::WebPlatformEventListener* listener = nullptr) {
DVLOG(2) << "requested start"; DVLOG(2) << "requested start";
if (state_ != PumpState::STOPPED) if (state_ != PumpState::STOPPED)
...@@ -69,7 +63,6 @@ class DeviceSensorEventPump { ...@@ -69,7 +63,6 @@ class DeviceSensorEventPump {
state_ = PumpState::PENDING_START; state_ = PumpState::PENDING_START;
DCHECK(!is_observing_); DCHECK(!is_observing_);
listener_ = static_cast<ListenerType*>(listener);
is_observing_ = true; is_observing_ = true;
SendStartMessage(frame); SendStartMessage(frame);
...@@ -88,7 +81,6 @@ class DeviceSensorEventPump { ...@@ -88,7 +81,6 @@ class DeviceSensorEventPump {
timer_.Stop(); timer_.Stop();
DCHECK(is_observing_); DCHECK(is_observing_);
listener_ = nullptr;
is_observing_ = false; is_observing_ = false;
SendStopMessage(); SendStopMessage();
...@@ -136,8 +128,6 @@ class DeviceSensorEventPump { ...@@ -136,8 +128,6 @@ class DeviceSensorEventPump {
// TaskRunnerTimer class // TaskRunnerTimer class
virtual void FireEvent(TimerBase*) = 0; virtual void FireEvent(TimerBase*) = 0;
ListenerType* listener() { return listener_; }
struct SensorEntry : public device::mojom::blink::SensorClient { struct SensorEntry : public device::mojom::blink::SensorClient {
SensorEntry(DeviceSensorEventPump* pump, SensorEntry(DeviceSensorEventPump* pump,
device::mojom::blink::SensorType sensor_type) device::mojom::blink::SensorType sensor_type)
...@@ -336,7 +326,6 @@ class DeviceSensorEventPump { ...@@ -336,7 +326,6 @@ class DeviceSensorEventPump {
PumpState state_; PumpState state_;
bool is_observing_ = false; bool is_observing_ = false;
ListenerType* listener_ = nullptr;
TaskRunnerTimer<DeviceSensorEventPump> timer_; TaskRunnerTimer<DeviceSensorEventPump> timer_;
DISALLOW_COPY_AND_ASSIGN(DeviceSensorEventPump); DISALLOW_COPY_AND_ASSIGN(DeviceSensorEventPump);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment