| Index: Source/modules/device_orientation/DeviceMotionController.h
|
| diff --git a/Source/modules/device_orientation/DeviceMotionController.h b/Source/modules/device_orientation/DeviceMotionController.h
|
| index f215c4805249b6020d5b56b5776fde95532a1e92..5639c8dab7733ba5e45897522070fef462b7ff2f 100644
|
| --- a/Source/modules/device_orientation/DeviceMotionController.h
|
| +++ b/Source/modules/device_orientation/DeviceMotionController.h
|
| @@ -27,31 +27,41 @@
|
| #ifndef DeviceMotionController_h
|
| #define DeviceMotionController_h
|
|
|
| -#include "core/page/DeviceController.h"
|
| +#include "core/dom/Event.h"
|
| +#include "core/platform/Supplementable.h"
|
| +#include "core/platform/Timer.h"
|
|
|
| namespace WebCore {
|
|
|
| -class DeviceMotionClient;
|
| class DeviceMotionData;
|
| +class Document;
|
| +
|
| +// FIXME: This class doesn't inherit from DeviceController anymore, which is a temporary
|
| +// solution. Once device orientation switches to the client-less design, move some of
|
| +// the methods in this class to the DeviceController.
|
| +class DeviceMotionController : public Supplement<ScriptExecutionContext> {
|
|
|
| -class DeviceMotionController : public DeviceController {
|
| public:
|
| - ~DeviceMotionController() { };
|
| + virtual ~DeviceMotionController();
|
|
|
| - static PassOwnPtr<DeviceMotionController> create(DeviceMotionClient*);
|
| + static const char* supplementName();
|
| + static DeviceMotionController* from(Document*);
|
|
|
| void didChangeDeviceMotion(DeviceMotionData*);
|
| - DeviceMotionClient* deviceMotionClient();
|
| + bool hasLastData();
|
| + PassRefPtr<Event> getLastEvent();
|
| + void dispatchDeviceEvent(const PassRefPtr<Event>);
|
| + void startUpdating();
|
| + void stopUpdating();
|
|
|
| - virtual bool hasLastData() OVERRIDE;
|
| - virtual PassRefPtr<Event> getLastEvent() OVERRIDE;
|
| +private:
|
| + explicit DeviceMotionController(Document*);
|
|
|
| - static const char* supplementName();
|
| - static DeviceMotionController* from(Page*);
|
| - static bool isActiveAt(Page*);
|
| + void fireDeviceEvent(Timer<DeviceMotionController>*);
|
|
|
| -private:
|
| - explicit DeviceMotionController(DeviceMotionClient*);
|
| + Document* m_document;
|
| + bool m_isActive;
|
| + Timer<DeviceMotionController> m_timer;
|
| };
|
|
|
| } // namespace WebCore
|
|
|