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

Unified Diff: Source/modules/device_light/DeviceLightController.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
« no previous file with comments | « Source/modules/battery/BatteryManager.cpp ('k') | Source/modules/device_light/DeviceLightController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/device_light/DeviceLightController.h
diff --git a/Source/modules/device_light/DeviceLightController.h b/Source/modules/device_light/DeviceLightController.h
index ed537288994ebe6900ae7d34ad77a02794b5bfdb..5ddfeec6fe567e6320bb74901a8fbcc6b2c6431e 100644
--- a/Source/modules/device_light/DeviceLightController.h
+++ b/Source/modules/device_light/DeviceLightController.h
@@ -6,15 +6,14 @@
#define DeviceLightController_h
#include "core/dom/DocumentSupplementable.h"
-#include "core/frame/DOMWindowLifecycleObserver.h"
-#include "core/frame/DeviceSensorEventController.h"
-#include "modules/EventModules.h"
+#include "core/frame/DeviceSingleWindowEventController.h"
namespace WebCore {
class DOMWindow;
+class Event;
-class DeviceLightController FINAL : public NoBaseWillBeGarbageCollectedFinalized<DeviceLightController>, public DeviceSensorEventController, public DocumentSupplement, public DOMWindowLifecycleObserver {
+class DeviceLightController FINAL : public NoBaseWillBeGarbageCollectedFinalized<DeviceLightController>, public DeviceSingleWindowEventController, public DocumentSupplement {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DeviceLightController);
public:
virtual ~DeviceLightController();
@@ -22,24 +21,18 @@ public:
static const char* supplementName();
static DeviceLightController& from(Document&);
- void didChangeDeviceLight(double);
-
private:
explicit DeviceLightController(Document&);
+
+ // Inherited from DeviceEventControllerBase.
virtual void registerWithDispatcher() OVERRIDE;
virtual void unregisterWithDispatcher() OVERRIDE;
-
- // Inherited from DOMWindowLifecycleObserver.
- virtual void didAddEventListener(DOMWindow*, const AtomicString&) OVERRIDE;
- virtual void didRemoveEventListener(DOMWindow*, const AtomicString&) OVERRIDE;
- virtual void didRemoveAllEventListeners(DOMWindow*) OVERRIDE;
-
virtual bool hasLastData() OVERRIDE;
- virtual PassRefPtrWillBeRawPtr<Event> getLastEvent() OVERRIDE;
- virtual bool isNullEvent(Event*) OVERRIDE;
- virtual Document* document() OVERRIDE;
- Document& m_document;
+ // Inherited from DeviceSingleWindowEventController.
+ virtual PassRefPtrWillBeRawPtr<Event> lastEvent() const OVERRIDE;
+ virtual const AtomicString& eventTypeName() const OVERRIDE;
+ virtual bool isNullEvent(Event*) const OVERRIDE;
};
} // namespace WebCore
« no previous file with comments | « Source/modules/battery/BatteryManager.cpp ('k') | Source/modules/device_light/DeviceLightController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698