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

Unified Diff: Source/modules/device_light/DeviceLightDispatcher.h

Issue 315573002: Generalize and refactor DeviceSensorEvent* architecture to support multi-event type targets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add stopUpdating in destructor of BatteryManager. Created 6 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: Source/modules/device_light/DeviceLightDispatcher.h
diff --git a/Source/modules/device_light/DeviceLightDispatcher.h b/Source/modules/device_light/DeviceLightDispatcher.h
index ff2c386b3ee032582f52cbcb40155fbd48e51f46..d886079f09089b250563d68e167de507a89be8ea 100644
--- a/Source/modules/device_light/DeviceLightDispatcher.h
+++ b/Source/modules/device_light/DeviceLightDispatcher.h
@@ -5,7 +5,7 @@
#ifndef DeviceLightDispatcher_h
#define DeviceLightDispatcher_h
-#include "core/frame/DeviceSensorEventDispatcher.h"
+#include "core/frame/DeviceEventDispatcherBase.h"
#include "public/platform/WebDeviceLightListener.h"
#include "wtf/RefPtr.h"
@@ -13,23 +13,21 @@ namespace WebCore {
class DeviceLightController;
-// This class listens to device light data and dispatches it to all
-// listening controllers
-class DeviceLightDispatcher FINAL : public DeviceSensorEventDispatcher, public blink::WebDeviceLightListener {
+// This class listens to device light data and notifies all registered controllers.
+class DeviceLightDispatcher FINAL : public DeviceEventDispatcherBase, public blink::WebDeviceLightListener {
public:
static DeviceLightDispatcher& instance();
double latestDeviceLightData() const;
- // This method is called every time new device light data is available.
+ // Inherited from WebDeviceLightListener.
virtual void didChangeDeviceLight(double) OVERRIDE;
- void addDeviceLightController(DeviceLightController*);
- void removeDeviceLightController(DeviceLightController*);
private:
DeviceLightDispatcher();
virtual ~DeviceLightDispatcher();
+ // Inherited from DeviceEventDispatcherBase.
virtual void startListening() OVERRIDE;
virtual void stopListening() OVERRIDE;
« no previous file with comments | « Source/modules/device_light/DeviceLightController.cpp ('k') | Source/modules/device_light/DeviceLightDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698