GeolocationClientGtk.h [plain text]
#ifndef GeolocationClientGtk_h
#define GeolocationClientGtk_h
#if ENABLE(GEOLOCATION)
#include "GeolocationClient.h"
#include "GeolocationPosition.h"
#include "GeolocationProviderGeoclue.h"
#include "GeolocationProviderGeoclueClient.h"
#include <wtf/RefPtr.h>
typedef struct _WebKitWebView WebKitWebView;
namespace WebCore {
class Geolocation;
}
namespace WebKit {
class GeolocationClient : public WebCore::GeolocationClient, public WebCore::GeolocationProviderGeoclueClient {
public:
GeolocationClient(WebKitWebView*);
void geolocationDestroyed();
void startUpdating();
void stopUpdating();
void setEnableHighAccuracy(bool);
WebCore::GeolocationPosition* lastPosition();
void requestPermission(WebCore::Geolocation*);
void cancelPermissionRequest(WebCore::Geolocation*);
private:
virtual void notifyPositionChanged(int timestamp, double latitude, double longitude, double altitude, double accuracy, double altitudeAccuracy);
virtual void notifyErrorOccurred(const char* message);
WebKitWebView* m_webView;
WebCore::GeolocationProviderGeoclue m_provider;
RefPtr<WebCore::GeolocationPosition> m_lastPosition;
};
}
#endif // ENABLE(GEOLOCATION)
#endif // GeolocationClientGtk_h