WebGeolocationManagerProxy.h [plain text]
#ifndef WebGeolocationManagerProxy_h
#define WebGeolocationManagerProxy_h
#include "APIObject.h"
#include "MessageReceiver.h"
#include "WebContextSupplement.h"
#include "WebGeolocationProvider.h"
#include <wtf/text/WTFString.h>
namespace WebKit {
class WebContext;
class WebGeolocationPosition;
class WebGeolocationManagerProxy : public TypedAPIObject<APIObject::TypeGeolocationManager>, public WebContextSupplement, private CoreIPC::MessageReceiver {
public:
static const char* supplementName();
static PassRefPtr<WebGeolocationManagerProxy> create(WebContext*);
virtual ~WebGeolocationManagerProxy();
void initializeProvider(const WKGeolocationProvider*);
void providerDidChangePosition(WebGeolocationPosition*);
void providerDidFailToDeterminePosition(const String& errorMessage = String());
using APIObject::ref;
using APIObject::deref;
private:
explicit WebGeolocationManagerProxy(WebContext*);
virtual void contextDestroyed() OVERRIDE;
virtual void processDidClose(WebProcessProxy*) OVERRIDE;
virtual void refWebContextSupplement() OVERRIDE;
virtual void derefWebContextSupplement() OVERRIDE;
virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
void startUpdating();
void stopUpdating();
bool m_isUpdating;
WebGeolocationProvider m_provider;
};
}
#endif // WebGeolocationManagerProxy_h