| 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 DeviceMotionController_h | 5 #ifndef DeviceMotionController_h |
| 6 #define DeviceMotionController_h | 6 #define DeviceMotionController_h |
| 7 | 7 |
| 8 #include "core/dom/DocumentSupplementable.h" | 8 #include "core/dom/DocumentSupplementable.h" |
| 9 #include "core/frame/DeviceSingleWindowEventController.h" | 9 #include "core/frame/DeviceSingleWindowEventController.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class DeviceMotionData; | |
| 14 class Event; | 13 class Event; |
| 15 | 14 |
| 16 class DeviceMotionController final : public DeviceSingleWindowEventController, p
ublic DocumentSupplement { | 15 class DeviceMotionController final : public DeviceSingleWindowEventController, p
ublic DocumentSupplement { |
| 17 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DeviceMotionController); | 16 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DeviceMotionController); |
| 18 public: | 17 public: |
| 19 virtual ~DeviceMotionController(); | 18 virtual ~DeviceMotionController(); |
| 20 | 19 |
| 21 static const char* supplementName(); | 20 static const char* supplementName(); |
| 22 static DeviceMotionController& from(Document&); | 21 static DeviceMotionController& from(Document&); |
| 23 | 22 |
| 24 virtual void trace(Visitor*) override; | 23 virtual void trace(Visitor*) override; |
| 25 | 24 |
| 26 private: | 25 private: |
| 27 explicit DeviceMotionController(Document&); | 26 explicit DeviceMotionController(Document&); |
| 28 | 27 |
| 29 // Inherited from DeviceEventControllerBase. | 28 // Inherited from DeviceEventControllerBase. |
| 30 virtual void registerWithDispatcher() override; | 29 virtual void registerWithDispatcher() override; |
| 31 virtual void unregisterWithDispatcher() override; | 30 virtual void unregisterWithDispatcher() override; |
| 32 virtual bool hasLastData() override; | 31 virtual bool hasLastData() override; |
| 33 | 32 |
| 34 // Inherited from DeviceSingleWindowEventController. | 33 // Inherited from DeviceSingleWindowEventController. |
| 35 virtual PassRefPtrWillBeRawPtr<Event> lastEvent() const override; | 34 virtual PassRefPtrWillBeRawPtr<Event> lastEvent() const override; |
| 36 virtual const AtomicString& eventTypeName() const override; | 35 virtual const AtomicString& eventTypeName() const override; |
| 37 virtual bool isNullEvent(Event*) const override; | 36 virtual bool isNullEvent(Event*) const override; |
| 38 }; | 37 }; |
| 39 | 38 |
| 40 } // namespace blink | 39 } // namespace blink |
| 41 | 40 |
| 42 #endif // DeviceMotionController_h | 41 #endif // DeviceMotionController_h |
| OLD | NEW |