| Index: Source/modules/device_light/DeviceLightController.h
|
| diff --git a/Source/modules/device_light/DeviceLightController.h b/Source/modules/device_light/DeviceLightController.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e32c47701409098f6f76d6ba053f160900af10b5
|
| --- /dev/null
|
| +++ b/Source/modules/device_light/DeviceLightController.h
|
| @@ -0,0 +1,48 @@
|
| +// 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 DeviceLightController_h
|
| +#define DeviceLightController_h
|
| +
|
| +#include "core/dom/DocumentSupplementable.h"
|
| +#include "core/events/Event.h"
|
| +#include "core/frame/DOMWindowLifecycleObserver.h"
|
| +#include "core/frame/DeviceSensorEventController.h"
|
| +
|
| +namespace WebCore {
|
| +
|
| +class DOMWindow;
|
| +
|
| +class DeviceLightController FINAL : public DeviceSensorEventController, public DocumentSupplement, public DOMWindowLifecycleObserver {
|
| +
|
| +public:
|
| + virtual ~DeviceLightController();
|
| +
|
| + static const char* supplementName();
|
| + static DeviceLightController& from(Document&);
|
| +
|
| + void didChangeDeviceLight(double);
|
| + virtual void trace(Visitor*) OVERRIDE { }
|
| +
|
| +private:
|
| + explicit DeviceLightController(Document&);
|
| + 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;
|
| +};
|
| +
|
| +} // namespace WebCore
|
| +
|
| +#endif // DeviceLightController_h
|
|
|