DeviceMotionClientBlackBerry.h [plain text]
#ifndef DeviceMotionClientBlackBerry_h
#define DeviceMotionClientBlackBerry_h
#include "DeviceMotionClient.h"
#include "DeviceMotionData.h"
#include <BlackBerryPlatformDeviceMotionTrackerListener.h>
namespace BlackBerry {
namespace WebKit {
class WebPagePrivate;
}
}
namespace BlackBerry {
namespace Platform {
class DeviceMotionTracker;
}
}
namespace WebCore {
class DeviceMotionClientBlackBerry : public DeviceMotionClient, public BlackBerry::Platform::DeviceMotionTrackerListener {
public:
DeviceMotionClientBlackBerry(BlackBerry::WebKit::WebPagePrivate*);
~DeviceMotionClientBlackBerry();
virtual void setController(DeviceMotionController*);
virtual void startUpdating();
virtual void stopUpdating();
virtual DeviceMotionData* currentDeviceMotion() const;
virtual void deviceMotionControllerDestroyed();
virtual void onMotion(const BlackBerry::Platform::DeviceMotionEvent*);
private:
BlackBerry::WebKit::WebPagePrivate* m_webPagePrivate;
BlackBerry::Platform::DeviceMotionTracker* m_tracker;
DeviceMotionController* m_controller;
RefPtr<DeviceMotionData> m_currentMotion;
double m_lastEventTime;
};
}
#endif // DeviceMotionClientBlackBerry_h