Chromium Code Reviews| 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..d4d2a0bf792aeead0f6dc5043d2c3df59310f2cc |
| --- /dev/null |
| +++ b/Source/modules/device_light/DeviceLightController.h |
| @@ -0,0 +1,46 @@ |
| +// 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" |
| +#include "modules/device_light/DeviceLightEvent.h" |
| + |
| + |
|
abarth-chromium
2014/03/18 22:48:53
You've got an extra line here.
riju_
2014/03/19 12:28:13
Done.
|
| +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); |
| + |
| +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 PassRefPtr<Event> getLastEvent() OVERRIDE; |
| + virtual bool isNullEvent(Event*) OVERRIDE; |
| +}; |
| + |
| +} // namespace WebCore |
| + |
| +#endif // DeviceLightController_h |