| OLD | NEW |
| 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" | 9 #include "platform/heap/Handle.h" |
| 10 #include "public/platform/WebDeviceLightListener.h" | 10 #include "public/platform/WebDeviceLightListener.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 // This class listens to device light data and notifies all registered controlle
rs. | 14 // This class listens to device light data and notifies all registered |
| 15 // controllers. |
| 15 class DeviceLightDispatcher final | 16 class DeviceLightDispatcher final |
| 16 : public GarbageCollectedFinalized<DeviceLightDispatcher>, | 17 : public GarbageCollectedFinalized<DeviceLightDispatcher>, |
| 17 public PlatformEventDispatcher, | 18 public PlatformEventDispatcher, |
| 18 public WebDeviceLightListener { | 19 public WebDeviceLightListener { |
| 19 USING_GARBAGE_COLLECTED_MIXIN(DeviceLightDispatcher); | 20 USING_GARBAGE_COLLECTED_MIXIN(DeviceLightDispatcher); |
| 20 | 21 |
| 21 public: | 22 public: |
| 22 static DeviceLightDispatcher& instance(); | 23 static DeviceLightDispatcher& instance(); |
| 23 ~DeviceLightDispatcher() override; | 24 ~DeviceLightDispatcher() override; |
| 24 | 25 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 35 // Inherited from PlatformEventDispatcher. | 36 // Inherited from PlatformEventDispatcher. |
| 36 void startListening() override; | 37 void startListening() override; |
| 37 void stopListening() override; | 38 void stopListening() override; |
| 38 | 39 |
| 39 double m_lastDeviceLightData; | 40 double m_lastDeviceLightData; |
| 40 }; | 41 }; |
| 41 | 42 |
| 42 } // namespace blink | 43 } // namespace blink |
| 43 | 44 |
| 44 #endif // DeviceLightDispatcher_h | 45 #endif // DeviceLightDispatcher_h |
| OLD | NEW |