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

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

Issue 651503002: Clean up forward declarations in Source/modules (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DeviceLightDispatcher_h 5 #ifndef DeviceLightDispatcher_h
6 #define DeviceLightDispatcher_h 6 #define DeviceLightDispatcher_h
7 7
8 #include "core/frame/PlatformEventDispatcher.h" 8 #include "core/frame/PlatformEventDispatcher.h"
9 #include "platform/heap/Handle.h"
10 #include "public/platform/WebDeviceLightListener.h" 9 #include "public/platform/WebDeviceLightListener.h"
11 #include "wtf/RefPtr.h"
12 10
13 namespace blink { 11 namespace blink {
14 12
15 class DeviceLightController;
16
17 // This class listens to device light data and notifies all registered controlle rs. 13 // This class listens to device light data and notifies all registered controlle rs.
18 class DeviceLightDispatcher final : public GarbageCollectedFinalized<DeviceLight Dispatcher>, public PlatformEventDispatcher, public WebDeviceLightListener { 14 class DeviceLightDispatcher final : public GarbageCollectedFinalized<DeviceLight Dispatcher>, public PlatformEventDispatcher, public WebDeviceLightListener {
19 USING_GARBAGE_COLLECTED_MIXIN(DeviceLightDispatcher); 15 USING_GARBAGE_COLLECTED_MIXIN(DeviceLightDispatcher);
20 public: 16 public:
21 static DeviceLightDispatcher& instance(); 17 static DeviceLightDispatcher& instance();
22 virtual ~DeviceLightDispatcher(); 18 virtual ~DeviceLightDispatcher();
23 19
24 double latestDeviceLightData() const; 20 double latestDeviceLightData() const;
25 21
26 // Inherited from WebDeviceLightListener. 22 // Inherited from WebDeviceLightListener.
27 virtual void didChangeDeviceLight(double) override; 23 virtual void didChangeDeviceLight(double) override;
28 24
29 virtual void trace(Visitor*) override; 25 virtual void trace(Visitor*) override;
30 26
31 private: 27 private:
32 DeviceLightDispatcher(); 28 DeviceLightDispatcher();
33 29
34 // Inherited from PlatformEventDispatcher. 30 // Inherited from PlatformEventDispatcher.
35 virtual void startListening() override; 31 virtual void startListening() override;
36 virtual void stopListening() override; 32 virtual void stopListening() override;
37 33
38 double m_lastDeviceLightData; 34 double m_lastDeviceLightData;
39 }; 35 };
40 36
41 } // namespace blink 37 } // namespace blink
42 38
43 #endif // DeviceLightDispatcher_h 39 #endif // DeviceLightDispatcher_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698