Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(550)

Side by Side Diff: third_party/WebKit/Source/modules/device_light/DeviceLightEvent.h

Issue 2823753002: Remove device light API
Patch Set: Restore DeviceLightEvent to LayoutTests/external/wpt/dom/nodes/Document-createEvent.html Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698