Home | History | Annotate | Download | only in page

Lines Matching refs:notifier

150         // This will cause this notifier to be deleted.
173 RefPtr<GeoNotifier> notifier = prpNotifier;
175 m_idToNotifierMap.set(id, notifier.get());
176 m_notifierToIdMap.set(notifier.release(), id);
189 void Geolocation::Watchers::remove(GeoNotifier* notifier)
191 NotifierToIdMap::iterator iter = m_notifierToIdMap.find(notifier);
198 bool Geolocation::Watchers::contains(GeoNotifier* notifier) const
200 return m_notifierToIdMap.contains(notifier);
288 RefPtr<GeoNotifier> notifier = startRequest(successCallback, errorCallback, options);
289 ASSERT(notifier);
291 m_oneShots.add(notifier);
299 RefPtr<GeoNotifier> notifier = startRequest(successCallback, errorCallback, options);
300 ASSERT(notifier);
306 m_watchers.set(nextAvailableWatchId, notifier.release());
312 RefPtr<GeoNotifier> notifier = GeoNotifier::create(this, successCallback, errorCallback, options);
317 notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage));
318 else if (haveSuitableCachedPosition(notifier->m_options.get()))
319 notifier->setUseCachedPosition();
320 else if (notifier->hasZeroTimeout())
321 notifier->startTimerIfNeeded();
325 m_pendingForPermissionNotifiers.add(notifier);
329 else if (startUpdating(notifier.get()))
330 notifier->startTimerIfNeeded();
332 notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage));
334 return notifier.release();
337 void Geolocation::fatalErrorOccurred(Geolocation::GeoNotifier* notifier)
340 m_oneShots.remove(notifier);
341 m_watchers.remove(notifier);
347 void Geolocation::requestUsesCachedPosition(GeoNotifier* notifier)
352 notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage));
356 m_requestsAwaitingCachedPosition.add(notifier);
375 GeoNotifier* notifier = iter->get();
376 notifier->runSuccessCallback(m_positionCache.cachedPosition());
380 if (m_oneShots.contains(notifier))
381 m_oneShots.remove(notifier);
382 else if (m_watchers.contains(notifier)) {
383 if (notifier->hasZeroTimeout() || startUpdating(notifier))
384 notifier->startTimerIfNeeded();
386 notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage));
396 void Geolocation::requestTimedOut(GeoNotifier* notifier)
399 m_oneShots.remove(notifier);
480 RefPtr<GeoNotifier> notifier = *it;
482 if (notifier->m_errorCallback)
483 notifier->m_errorCallback->handleEvent(error);
491 RefPtr<GeoNotifier> notifier = *it;
492 ASSERT(notifier->m_successCallback);
494 notifier->m_successCallback->handleEvent(position);
502 RefPtr<GeoNotifier> notifier = *it;
503 notifier->m_timer.stop();
550 GeoNotifier* notifier = it->get();
551 if (notifier->m_useCachedPosition) {
553 cached->append(notifier);
555 nonCached.append(notifier);
564 GeoNotifier* notifier = it->get();
565 dest.add(notifier);
701 bool Geolocation::startUpdating(GeoNotifier* notifier)
708 page->geolocationController()->addObserver(this, notifier->m_options->enableHighAccuracy());
711 return m_service->startUpdating(notifier->m_options.get());
736 GeoNotifier* notifier = iter->get();
740 // The notifier is always ref'ed by m_oneShots or m_watchers.
741 if (startUpdating(notifier))
742 notifier->startTimerIfNeeded();
744 notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage));
746 notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage));