• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/WebCore-7537.78.1/Modules/geolocation/

Lines Matching refs:notifier

156         // This will cause this notifier to be deleted.
179 RefPtr<GeoNotifier> notifier = prpNotifier;
181 if (!m_idToNotifierMap.add(id, notifier.get()).isNewEntry)
183 m_notifierToIdMap.set(notifier.release(), id);
206 void Geolocation::Watchers::remove(GeoNotifier* notifier)
208 NotifierToIdMap::iterator iter = m_notifierToIdMap.find(notifier);
215 bool Geolocation::Watchers::contains(GeoNotifier* notifier) const
217 return m_notifierToIdMap.contains(notifier);
297 RefPtr<GeoNotifier> notifier = GeoNotifier::create(this, successCallback, errorCallback, options);
298 startRequest(notifier.get());
300 m_oneShots.add(notifier);
308 RefPtr<GeoNotifier> notifier = GeoNotifier::create(this, successCallback, errorCallback, options);
309 startRequest(notifier.get());
315 } while (!m_watchers.add(watchID, notifier));
319 void Geolocation::startRequest(GeoNotifier *notifier)
324 notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage)));
325 else if (haveSuitableCachedPosition(notifier->options()))
326 notifier->setUseCachedPosition();
327 else if (notifier->hasZeroTimeout())
328 notifier->startTimerIfNeeded();
331 m_pendingForPermissionNotifiers.add(notifier);
333 } else if (startUpdating(notifier))
334 notifier->startTimerIfNeeded();
336 notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage)));
339 void Geolocation::fatalErrorOccurred(Geolocation::GeoNotifier* notifier)
342 m_oneShots.remove(notifier);
343 m_watchers.remove(notifier);
349 void Geolocation::requestUsesCachedPosition(GeoNotifier* notifier)
354 notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage)));
358 m_requestsAwaitingCachedPosition.add(notifier);
377 GeoNotifier* notifier = iter->get();
378 notifier->runSuccessCallback(lastPosition());
382 if (m_oneShots.contains(notifier))
383 m_oneShots.remove(notifier);
384 else if (m_watchers.contains(notifier)) {
385 if (notifier->hasZeroTimeout() || startUpdating(notifier))
386 notifier->startTimerIfNeeded();
388 notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage)));
398 void Geolocation::requestTimedOut(GeoNotifier* notifier)
401 m_oneShots.remove(notifier);
425 if (GeoNotifier* notifier = m_watchers.find(watchID))
426 m_pendingForPermissionNotifiers.remove(notifier);
470 RefPtr<GeoNotifier> notifier = *it;
472 notifier->runErrorCallback(error);
533 GeoNotifier* notifier = it->get();
534 if (notifier->useCachedPosition()) {
536 cached->append(notifier);
538 nonCached.append(notifier);
547 GeoNotifier* notifier = it->get();
548 dest.add(notifier);
642 bool Geolocation::startUpdating(GeoNotifier* notifier)
648 GeolocationController::from(page)->addObserver(this, notifier->options()->enableHighAccuracy());
667 GeoNotifier* notifier = iter->get();
671 // The notifier is always ref'ed by m_oneShots or m_watchers.
672 if (startUpdating(notifier))
673 notifier->startTimerIfNeeded();
675 notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage)));
677 notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage)));