| Index: Source/modules/device_light/DeviceLightEvent.h
|
| diff --git a/Source/modules/device_light/DeviceLightEvent.h b/Source/modules/device_light/DeviceLightEvent.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f96b856b0cfc0bc6b7bb098b8f33fc9cd0ff0246
|
| --- /dev/null
|
| +++ b/Source/modules/device_light/DeviceLightEvent.h
|
| @@ -0,0 +1,55 @@
|
| +// 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 DeviceLightEvent_h
|
| +#define DeviceLightEvent_h
|
| +
|
| +#include "core/events/Event.h"
|
| +
|
| +namespace WebCore {
|
| +
|
| +struct DeviceLightEventInit : public EventInit {
|
| + DeviceLightEventInit()
|
| + : value(std::numeric_limits<double>::infinity())
|
| + {
|
| + bubbles = true;
|
| + };
|
| +
|
| + double value;
|
| +};
|
| +
|
| +class DeviceLightEvent FINAL : public Event {
|
| +public:
|
| + virtual ~DeviceLightEvent();
|
| +
|
| + static PassRefPtr<DeviceLightEvent> create()
|
| + {
|
| + return adoptRef(new DeviceLightEvent);
|
| + }
|
| + static PassRefPtr<DeviceLightEvent> create(const AtomicString& eventType, const double value)
|
| + {
|
| + return adoptRef(new DeviceLightEvent(eventType, value));
|
| + }
|
| + static PassRefPtr<DeviceLightEvent> create(const AtomicString& eventType, const DeviceLightEventInit& initializer)
|
| + {
|
| + return adoptRef(new DeviceLightEvent(eventType, initializer));
|
| + }
|
| +
|
| + double value() const { return m_value; }
|
| +
|
| + virtual const AtomicString& interfaceName() const OVERRIDE;
|
| +
|
| +private:
|
| + DeviceLightEvent();
|
| + DeviceLightEvent(const AtomicString& eventType, const double value);
|
| + DeviceLightEvent(const AtomicString& eventType, const DeviceLightEventInit& initializer);
|
| +
|
| + double m_value;
|
| +};
|
| +
|
| +DEFINE_TYPE_CASTS(DeviceLightEvent, Event, event, event->interfaceName() == EventNames::DeviceLightEvent, event.interfaceName() == EventNames::DeviceLightEvent);
|
| +
|
| +} // namespace WebCore
|
| +
|
| +#endif // DeviceLightEvent_h
|
|
|