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.
5 #ifndef DeviceMotionController_h
6 #define DeviceMotionController_h
8 #include "core/dom/DocumentSupplementable.h"
9 #include "core/frame/DeviceSingleWindowEventController.h"
13 class DeviceMotionData;
16 class DeviceMotionController FINAL : public NoBaseWillBeGarbageCollectedFinalized<DeviceMotionController>, public DeviceSingleWindowEventController, public DocumentSupplement {
17 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DeviceMotionController);
19 virtual ~DeviceMotionController();
21 static const char* supplementName();
22 static DeviceMotionController& from(Document&);
25 explicit DeviceMotionController(Document&);
27 // Inherited from DeviceEventControllerBase.
28 virtual void registerWithDispatcher() OVERRIDE;
29 virtual void unregisterWithDispatcher() OVERRIDE;
30 virtual bool hasLastData() OVERRIDE;
32 // Inherited from DeviceSingleWindowEventController.
33 virtual PassRefPtrWillBeRawPtr<Event> lastEvent() const OVERRIDE;
34 virtual const AtomicString& eventTypeName() const OVERRIDE;
35 virtual bool isNullEvent(Event*) const OVERRIDE;
38 } // namespace WebCore
40 #endif // DeviceMotionController_h