This source file includes following definitions.
- setController
- geolocationDestroyed
- startUpdating
- stopUpdating
- setEnableHighAccuracy
- lastPosition
- requestPermission
- cancelPermissionRequest
#include "config.h"
#include "GeolocationClientProxy.h"
#include "WebGeolocationClient.h"
#include "WebGeolocationPermissionRequest.h"
#include "WebGeolocationPosition.h"
#include "modules/geolocation/Geolocation.h"
#include "modules/geolocation/GeolocationPosition.h"
namespace blink {
GeolocationClientProxy::GeolocationClientProxy(WebGeolocationClient* client)
: m_client(client)
{
}
GeolocationClientProxy::~GeolocationClientProxy()
{
}
void GeolocationClientProxy::setController(WebCore::GeolocationController* controller)
{
if (m_client) {
m_client->setController(new WebGeolocationController(controller));
}
}
void GeolocationClientProxy::geolocationDestroyed()
{
if (m_client)
m_client->geolocationDestroyed();
}
void GeolocationClientProxy::startUpdating()
{
m_client->startUpdating();
}
void GeolocationClientProxy::stopUpdating()
{
m_client->stopUpdating();
}
void GeolocationClientProxy::setEnableHighAccuracy(bool highAccuracy)
{
m_client->setEnableHighAccuracy(highAccuracy);
}
WebCore::GeolocationPosition* GeolocationClientProxy::lastPosition()
{
WebGeolocationPosition webPosition;
if (m_client->lastPosition(webPosition))
m_lastPosition = webPosition;
else
m_lastPosition.clear();
return m_lastPosition.get();
}
void GeolocationClientProxy::requestPermission(WebCore::Geolocation* geolocation)
{
m_client->requestPermission(WebGeolocationPermissionRequest(geolocation));
}
void GeolocationClientProxy::cancelPermissionRequest(WebCore::Geolocation* geolocation)
{
m_client->cancelPermissionRequest(WebGeolocationPermissionRequest(geolocation));
}
}