OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DeviceLightController_h |
| 6 #define DeviceLightController_h |
| 7 |
| 8 #include "core/dom/DocumentSupplementable.h" |
| 9 #include "core/events/Event.h" |
| 10 #include "core/frame/DOMWindowLifecycleObserver.h" |
| 11 #include "core/frame/DeviceSensorEventController.h" |
| 12 |
| 13 namespace WebCore { |
| 14 |
| 15 class DOMWindow; |
| 16 |
| 17 class DeviceLightController FINAL : public DeviceSensorEventController, public D
ocumentSupplement, public DOMWindowLifecycleObserver { |
| 18 |
| 19 public: |
| 20 virtual ~DeviceLightController(); |
| 21 |
| 22 static const char* supplementName(); |
| 23 static DeviceLightController& from(Document&); |
| 24 |
| 25 void didChangeDeviceLight(double); |
| 26 virtual void trace(Visitor*) OVERRIDE { } |
| 27 |
| 28 private: |
| 29 explicit DeviceLightController(Document&); |
| 30 virtual void registerWithDispatcher() OVERRIDE; |
| 31 virtual void unregisterWithDispatcher() OVERRIDE; |
| 32 |
| 33 // Inherited from DOMWindowLifecycleObserver. |
| 34 virtual void didAddEventListener(DOMWindow*, const AtomicString&) OVERRIDE; |
| 35 virtual void didRemoveEventListener(DOMWindow*, const AtomicString&) OVERRID
E; |
| 36 virtual void didRemoveAllEventListeners(DOMWindow*) OVERRIDE; |
| 37 |
| 38 virtual bool hasLastData() OVERRIDE; |
| 39 virtual PassRefPtrWillBeRawPtr<Event> getLastEvent() OVERRIDE; |
| 40 virtual bool isNullEvent(Event*) OVERRIDE; |
| 41 }; |
| 42 |
| 43 } // namespace WebCore |
| 44 |
| 45 #endif // DeviceLightController_h |
OLD | NEW |