Chromium Code Reviews| 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..8002f0a2ab9401b6a2dbd77b10284e9bb7ffa536 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; |
| + |
| +// This class doesn't inherit from DeviceController anymore, which is a temporary solution. |
|
Peter Beverloo
2013/05/08 13:15:01
This should start with FIXME:
timvolodine
2013/05/09 10:08:28
Done.
|
| +// Once the device orientation switches to the client-less design, move some of the |
|
Peter Beverloo
2013/05/08 13:15:01
nit: s/the//
timvolodine
2013/05/09 10:08:28
Done.
|
| +// 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* 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 |