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

Side by Side Diff: third_party/WebKit/Source/modules/device_light/DeviceLightDispatcher.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 DeviceLightDispatcher_h
6 #define DeviceLightDispatcher_h
7
8 #include "core/frame/PlatformEventDispatcher.h"
9 #include "platform/heap/Handle.h"
10 #include "public/platform/WebDeviceLightListener.h"
11
12 namespace blink {
13
14 // This class listens to device light data and notifies all registered
15 // controllers.
16 class DeviceLightDispatcher final
17 : public GarbageCollectedFinalized<DeviceLightDispatcher>,
18 public PlatformEventDispatcher,
19 public WebDeviceLightListener {
20 USING_GARBAGE_COLLECTED_MIXIN(DeviceLightDispatcher);
21
22 public:
23 static DeviceLightDispatcher& instance();
24 ~DeviceLightDispatcher() override;
25
26 double latestDeviceLightData() const;
27
28 // Inherited from WebDeviceLightListener.
29 void didChangeDeviceLight(double) override;
30
31 DECLARE_VIRTUAL_TRACE();
32
33 private:
34 DeviceLightDispatcher();
35
36 // Inherited from PlatformEventDispatcher.
37 void startListening() override;
38 void stopListening() override;
39
40 double m_lastDeviceLightData;
41 };
42
43 } // namespace blink
44
45 #endif // DeviceLightDispatcher_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698