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

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

Issue 2845763002: Remove DeviceLightEvent implementation (Closed)
Patch Set: same as previous patch Created 3 years, 7 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 last_device_light_data_;
41 };
42
43 } // namespace blink
44
45 #endif // DeviceLightDispatcher_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698