summaryrefslogtreecommitdiffstats
path: root/WebCore/page/Geolocation.h
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-01-25 17:18:32 +0000
committerSteve Block <steveblock@google.com>2010-01-26 18:03:24 +0000
commita8d4462216d8e009ee5662660a0621b67c6e727f (patch)
treed15ac2a6d131439cbd7eaa2d2178224a46c066cd /WebCore/page/Geolocation.h
parentab3eedd7e7e8a8ab78e3a507f85afcc6353461b0 (diff)
downloadexternal_webkit-a8d4462216d8e009ee5662660a0621b67c6e727f.zip
external_webkit-a8d4462216d8e009ee5662660a0621b67c6e727f.tar.gz
external_webkit-a8d4462216d8e009ee5662660a0621b67c6e727f.tar.bz2
Fixes Geolocation maximumAge implementation to work when requestPermission is synchronous
Geolocation::requestPermission may be implemented synchronously or asynchronously. See https://bugs.webkit.org/show_bug.cgi?id=26993 The current implementation of maximumAge on Android requires that requestPermission is asynchronous. This change fixes the code to work with both synchronous and asynchronous implementations of requestPermission. This will allow the maximumAge code to be upstreamed to webkit.org. See https://bugs.webkit.org/show_bug.cgi?id=30676 Change-Id: If7115e5d34ec308c91a1873a6841731dc37c18bd
Diffstat (limited to 'WebCore/page/Geolocation.h')
-rw-r--r--WebCore/page/Geolocation.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/WebCore/page/Geolocation.h b/WebCore/page/Geolocation.h
index 808ee9c..077a695 100644
--- a/WebCore/page/Geolocation.h
+++ b/WebCore/page/Geolocation.h
@@ -96,7 +96,8 @@ private:
void setFatalError(PassRefPtr<PositionError>);
bool hasZeroTimeout() const;
- void setCachedPosition(Geoposition* cachedPosition);
+ void setUseCachedPosition();
+ void makeSuccessCallback(Geoposition*);
void startTimerIfNeeded();
void timerFired(Timer<GeoNotifier>*);
@@ -106,7 +107,7 @@ private:
RefPtr<PositionOptions> m_options;
Timer<GeoNotifier> m_timer;
RefPtr<PositionError> m_fatalError;
- RefPtr<Geoposition> m_cachedPosition;
+ bool m_useCachedPosition;
private:
GeoNotifier(Geolocation*, PassRefPtr<PositionCallback>, PassRefPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>);
@@ -161,8 +162,9 @@ private:
void fatalErrorOccurred(GeoNotifier*);
void requestTimedOut(GeoNotifier*);
- void requestReturnedCachedPosition(GeoNotifier*);
+ void requestUsesCachedPosition(GeoNotifier*);
bool haveSuitableCachedPosition(PositionOptions*);
+ void makeCachedPositionCallbacks();
typedef HashSet<RefPtr<GeoNotifier> > GeoNotifierSet;