| 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/Document.h" |
| 9 #include "core/frame/DeviceSingleWindowEventController.h" | 9 #include "core/frame/DeviceSingleWindowEventController.h" |
| 10 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class Event; | 14 class Event; |
| 15 | 15 |
| 16 class MODULES_EXPORT DeviceMotionController final : public DeviceSingleWindowEve
ntController, public DocumentSupplement { | 16 class MODULES_EXPORT DeviceMotionController final : public DeviceSingleWindowEve
ntController, public WillBeHeapSupplement<Document> { |
| 17 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DeviceMotionController); | 17 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DeviceMotionController); |
| 18 public: | 18 public: |
| 19 virtual ~DeviceMotionController(); | 19 virtual ~DeviceMotionController(); |
| 20 | 20 |
| 21 static const char* supplementName(); | 21 static const char* supplementName(); |
| 22 static DeviceMotionController& from(Document&); | 22 static DeviceMotionController& from(Document&); |
| 23 | 23 |
| 24 // DeviceSingleWindowEventController | 24 // DeviceSingleWindowEventController |
| 25 void didAddEventListener(LocalDOMWindow*, const AtomicString& eventType) ove
rride; | 25 void didAddEventListener(LocalDOMWindow*, const AtomicString& eventType) ove
rride; |
| 26 | 26 |
| 27 DECLARE_VIRTUAL_TRACE(); | 27 DECLARE_VIRTUAL_TRACE(); |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 explicit DeviceMotionController(Document&); | 30 explicit DeviceMotionController(Document&); |
| 31 | 31 |
| 32 // Inherited from DeviceEventControllerBase. | 32 // Inherited from DeviceEventControllerBase. |
| 33 virtual void registerWithDispatcher() override; | 33 virtual void registerWithDispatcher() override; |
| 34 virtual void unregisterWithDispatcher() override; | 34 virtual void unregisterWithDispatcher() override; |
| 35 virtual bool hasLastData() override; | 35 virtual bool hasLastData() override; |
| 36 | 36 |
| 37 // Inherited from DeviceSingleWindowEventController. | 37 // Inherited from DeviceSingleWindowEventController. |
| 38 virtual PassRefPtrWillBeRawPtr<Event> lastEvent() const override; | 38 virtual PassRefPtrWillBeRawPtr<Event> lastEvent() const override; |
| 39 virtual const AtomicString& eventTypeName() const override; | 39 virtual const AtomicString& eventTypeName() const override; |
| 40 virtual bool isNullEvent(Event*) const override; | 40 virtual bool isNullEvent(Event*) const override; |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 } // namespace blink | 43 } // namespace blink |
| 44 | 44 |
| 45 #endif // DeviceMotionController_h | 45 #endif // DeviceMotionController_h |
| OLD | NEW |