| 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 DeviceLightEvent_h | |
| 6 #define DeviceLightEvent_h | |
| 7 | |
| 8 #include "modules/EventModules.h" | |
| 9 #include "modules/device_light/DeviceLightEventInit.h" | |
| 10 #include "platform/heap/Handle.h" | |
| 11 | |
| 12 namespace blink { | |
| 13 | |
| 14 class DeviceLightEvent final : public Event { | |
| 15 DEFINE_WRAPPERTYPEINFO(); | |
| 16 | |
| 17 public: | |
| 18 ~DeviceLightEvent() override; | |
| 19 | |
| 20 static DeviceLightEvent* create(const AtomicString& eventType, double value) { | |
| 21 return new DeviceLightEvent(eventType, value); | |
| 22 } | |
| 23 static DeviceLightEvent* create(const AtomicString& eventType, | |
| 24 const DeviceLightEventInit& initializer) { | |
| 25 return new DeviceLightEvent(eventType, initializer); | |
| 26 } | |
| 27 | |
| 28 double value() const { return m_value; } | |
| 29 | |
| 30 const AtomicString& interfaceName() const override; | |
| 31 | |
| 32 private: | |
| 33 DeviceLightEvent(const AtomicString& eventType, double value); | |
| 34 DeviceLightEvent(const AtomicString& eventType, | |
| 35 const DeviceLightEventInit& initializer); | |
| 36 | |
| 37 double m_value; | |
| 38 }; | |
| 39 | |
| 40 DEFINE_TYPE_CASTS(DeviceLightEvent, | |
| 41 Event, | |
| 42 event, | |
| 43 event->interfaceName() == EventNames::DeviceLightEvent, | |
| 44 event.interfaceName() == EventNames::DeviceLightEvent); | |
| 45 | |
| 46 } // namespace blink | |
| 47 | |
| 48 #endif // DeviceLightEvent_h | |
| OLD | NEW |