summaryrefslogtreecommitdiffstats
path: root/WebCore/page/Geolocation.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-02-01 13:28:26 +0000
committerSteve Block <steveblock@google.com>2010-02-01 13:39:57 +0000
commite8494e25fdde6a0c52c612fe28eddca35c0e5ce8 (patch)
tree051bc35f9138a0bba319718b47973ca8e7638f06 /WebCore/page/Geolocation.cpp
parentdb42c078ffb0f6a679e3853cb4ebb39e09c1f815 (diff)
downloadexternal_webkit-e8494e25fdde6a0c52c612fe28eddca35c0e5ce8.zip
external_webkit-e8494e25fdde6a0c52c612fe28eddca35c0e5ce8.tar.gz
external_webkit-e8494e25fdde6a0c52c612fe28eddca35c0e5ce8.tar.bz2
Cherry-pick WebKit change 54096 for client-based Geolocation
See http://trac.webkit.org/changeset/54096 This is required to bring Geolocation up-to-date with webkit.org to allow upstreaming of maximumAge code. Change-Id: Ic4f06aa2cf4ef8655bd05cd30746d9548f7e0d33
Diffstat (limited to 'WebCore/page/Geolocation.cpp')
-rw-r--r--WebCore/page/Geolocation.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index 89897e1..237ceaf 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -283,9 +283,13 @@ PassRefPtr<Geolocation::GeoNotifier> Geolocation::startRequest(PassRefPtr<Positi
if (haveSuitableCachedPosition(notifier->m_options.get()))
notifier->setUseCachedPosition();
else {
- if (notifier->hasZeroTimeout() || startUpdating(notifier.get()))
- notifier->startTimerIfNeeded();
- else
+ if (notifier->hasZeroTimeout() || startUpdating(notifier.get())) {
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ // Only start timer if we're not waiting for user permission.
+ if (!m_startRequestPermissionNotifier)
+#endif
+ notifier->startTimerIfNeeded();
+ } else
notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, "Failed to start Geolocation service"));
}
}
@@ -407,6 +411,7 @@ void Geolocation::setIsAllowed(bool allowed)
if (m_startRequestPermissionNotifier) {
if (isAllowed()) {
// Permission request was made during the startUpdating process
+ m_startRequestPermissionNotifier->startTimerIfNeeded();
m_startRequestPermissionNotifier = 0;
if (!m_frame)
return;