diff options
Diffstat (limited to 'WebCore/page/Geolocation.cpp')
-rw-r--r-- | WebCore/page/Geolocation.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp index de01b66..65c8902 100644 --- a/WebCore/page/Geolocation.cpp +++ b/WebCore/page/Geolocation.cpp @@ -64,7 +64,7 @@ static PassRefPtr<Geoposition> createGeoposition(GeolocationPosition* position) RefPtr<Coordinates> coordinates = Coordinates::create(position->latitude(), position->longitude(), position->canProvideAltitude(), position->altitude(), position->accuracy(), position->canProvideAltitudeAccuracy(), position->altitudeAccuracy(), position->canProvideHeading(), position->heading(), position->canProvideSpeed(), position->speed()); - return Geoposition::create(coordinates.release(), position->timestamp()); + return Geoposition::create(coordinates.release(), convertSecondsToDOMTimeStamp(position->timestamp())); } static PassRefPtr<PositionError> createPositionError(GeolocationError* error) @@ -211,7 +211,7 @@ bool Geolocation::Watchers::isEmpty() const return m_idToNotifierMap.isEmpty(); } -void Geolocation::Watchers::getNotifiersVector(Vector<RefPtr<GeoNotifier> >& copy) const +void Geolocation::Watchers::getNotifiersVector(GeoNotifierVector& copy) const { copyValuesToVector(m_idToNotifierMap, copy); } @@ -393,7 +393,7 @@ bool Geolocation::haveSuitableCachedPosition(PositionOptions* options) return true; if (!options->maximumAge()) return false; - DOMTimeStamp currentTimeMillis = currentTime() * 1000.0; + DOMTimeStamp currentTimeMillis = convertSecondsToDOMTimeStamp(currentTime()); return m_positionCache->cachedPosition()->timestamp() > currentTimeMillis - options->maximumAge(); } @@ -456,10 +456,10 @@ void Geolocation::setIsAllowed(bool allowed) makeCachedPositionCallbacks(); } -void Geolocation::sendError(Vector<RefPtr<GeoNotifier> >& notifiers, PositionError* error) +void Geolocation::sendError(GeoNotifierVector& notifiers, PositionError* error) { - Vector<RefPtr<GeoNotifier> >::const_iterator end = notifiers.end(); - for (Vector<RefPtr<GeoNotifier> >::const_iterator it = notifiers.begin(); it != end; ++it) { + GeoNotifierVector::const_iterator end = notifiers.end(); + for (GeoNotifierVector::const_iterator it = notifiers.begin(); it != end; ++it) { RefPtr<GeoNotifier> notifier = *it; if (notifier->m_errorCallback) @@ -467,10 +467,10 @@ void Geolocation::sendError(Vector<RefPtr<GeoNotifier> >& notifiers, PositionErr } } -void Geolocation::sendPosition(Vector<RefPtr<GeoNotifier> >& notifiers, Geoposition* position) +void Geolocation::sendPosition(GeoNotifierVector& notifiers, Geoposition* position) { - Vector<RefPtr<GeoNotifier> >::const_iterator end = notifiers.end(); - for (Vector<RefPtr<GeoNotifier> >::const_iterator it = notifiers.begin(); it != end; ++it) { + GeoNotifierVector::const_iterator end = notifiers.end(); + for (GeoNotifierVector::const_iterator it = notifiers.begin(); it != end; ++it) { RefPtr<GeoNotifier> notifier = *it; ASSERT(notifier->m_successCallback); @@ -478,10 +478,10 @@ void Geolocation::sendPosition(Vector<RefPtr<GeoNotifier> >& notifiers, Geoposit } } -void Geolocation::stopTimer(Vector<RefPtr<GeoNotifier> >& notifiers) +void Geolocation::stopTimer(GeoNotifierVector& notifiers) { - Vector<RefPtr<GeoNotifier> >::const_iterator end = notifiers.end(); - for (Vector<RefPtr<GeoNotifier> >::const_iterator it = notifiers.begin(); it != end; ++it) { + GeoNotifierVector::const_iterator end = notifiers.end(); + for (GeoNotifierVector::const_iterator it = notifiers.begin(); it != end; ++it) { RefPtr<GeoNotifier> notifier = *it; notifier->m_timer.stop(); } @@ -489,7 +489,7 @@ void Geolocation::stopTimer(Vector<RefPtr<GeoNotifier> >& notifiers) void Geolocation::stopTimersForOneShots() { - Vector<RefPtr<GeoNotifier> > copy; + GeoNotifierVector copy; copyToVector(m_oneShots, copy); stopTimer(copy); @@ -497,7 +497,7 @@ void Geolocation::stopTimersForOneShots() void Geolocation::stopTimersForWatchers() { - Vector<RefPtr<GeoNotifier> > copy; + GeoNotifierVector copy; m_watchers.getNotifiersVector(copy); stopTimer(copy); @@ -509,16 +509,16 @@ void Geolocation::stopTimers() stopTimersForWatchers(); } -void Geolocation::cancelRequests(Vector<RefPtr<GeoNotifier> >& notifiers) +void Geolocation::cancelRequests(GeoNotifierVector& notifiers) { - Vector<RefPtr<GeoNotifier> >::const_iterator end = notifiers.end(); - for (Vector<RefPtr<GeoNotifier> >::const_iterator it = notifiers.begin(); it != end; ++it) + GeoNotifierVector::const_iterator end = notifiers.end(); + for (GeoNotifierVector::const_iterator it = notifiers.begin(); it != end; ++it) (*it)->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, framelessDocumentErrorMessage)); } void Geolocation::cancelAllRequests() { - Vector<RefPtr<GeoNotifier> > copy; + GeoNotifierVector copy; copyToVector(m_oneShots, copy); cancelRequests(copy); m_watchers.getNotifiersVector(copy); @@ -529,10 +529,10 @@ void Geolocation::handleError(PositionError* error) { ASSERT(error); - Vector<RefPtr<GeoNotifier> > oneShotsCopy; + GeoNotifierVector oneShotsCopy; copyToVector(m_oneShots, oneShotsCopy); - Vector<RefPtr<GeoNotifier> > watchersCopy; + GeoNotifierVector watchersCopy; m_watchers.getNotifiersVector(watchersCopy); // Clear the lists before we make the callbacks, to avoid clearing notifiers @@ -591,10 +591,10 @@ void Geolocation::makeSuccessCallbacks() ASSERT(lastPosition()); ASSERT(isAllowed()); - Vector<RefPtr<GeoNotifier> > oneShotsCopy; + GeoNotifierVector oneShotsCopy; copyToVector(m_oneShots, oneShotsCopy); - Vector<RefPtr<GeoNotifier> > watchersCopy; + GeoNotifierVector watchersCopy; m_watchers.getNotifiersVector(watchersCopy); // Clear the lists before we make the callbacks, to avoid clearing notifiers |