Geoposition* Geolocation::lastPosition() { Page* page = this->page(); if (!page) return nullptr; m_lastPosition = createGeoposition(GeolocationController::from(page)->lastPosition()); return m_lastPosition.get(); }
Geoposition* Geolocation::lastPosition() { LocalFrame* frame = this->frame(); if (!frame) return 0; m_lastPosition = createGeoposition(GeolocationController::from(frame)->lastPosition()); return m_lastPosition.get(); }
void Geolocation::onPositionUpdated( device::mojom::blink::GeopositionPtr position) { m_disconnectedGeolocationService = false; if (position->valid) { m_lastPosition = createGeoposition(*position); positionChanged(); } else { handleError( createPositionError(position->error_code, position->error_message)); } if (!m_disconnectedGeolocationService) queryNextPosition(); }
Geoposition* Geolocation::lastPosition() { #if ENABLE(CLIENT_BASED_GEOLOCATION) Page* page = this->page(); if (!page) return 0; m_lastPosition = createGeoposition(page->geolocationController()->lastPosition()); #else m_lastPosition = m_service->lastPosition(); #endif return m_lastPosition.get(); }
Geoposition* Geolocation::lastPosition() { ASSERT(isAllowed()); #if ENABLE(CLIENT_BASED_GEOLOCATION) if (!m_frame) return 0; Page* page = m_frame->page(); if (!page) return 0; m_lastPosition = createGeoposition(page->geolocationController()->lastPosition()); #else m_lastPosition = m_service->lastPosition(); #endif return m_lastPosition.get(); }
void Geolocation::setPosition(GeolocationPosition* position) { positionChanged(createGeoposition(position)); }